pub struct RoomList {
pub(super) list: RefCell<IndexMap<OwnedRoomId, Room>>,
pub(super) joining_rooms: RefCell<HashSet<OwnedRoomOrAliasId>>,
tombstoned_rooms: RefCell<HashSet<OwnedRoomId>>,
session: WeakRef<Session>,
metainfo: RoomListMetainfo,
pub(super) get_wait_source: RefCell<Option<SourceId>>,
}
Fields§
§list: RefCell<IndexMap<OwnedRoomId, Room>>
The list of rooms.
joining_rooms: RefCell<HashSet<OwnedRoomOrAliasId>>
The list of rooms we are currently joining.
tombstoned_rooms: RefCell<HashSet<OwnedRoomId>>
The list of rooms that were upgraded and for which we have not joined the successor yet.
session: WeakRef<Session>
The current session.
metainfo: RoomListMetainfo
The rooms metainfo that allow to restore this RoomList
from its
previous state.
get_wait_source: RefCell<Option<SourceId>>
Implementations§
Source§impl RoomList
impl RoomList
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl RoomList
impl RoomList
Sourcepub(super) fn get(&self, room_id: &RoomId) -> Option<Room>
pub(super) fn get(&self, room_id: &RoomId) -> Option<Room>
Get the room with the given room ID, if any.
Sourcefn contains(&self, room_id: &RoomId) -> bool
fn contains(&self, room_id: &RoomId) -> bool
Whether this list contains the room with the given ID.
Sourcefn remove_joining_room(&self, identifier: &RoomOrAliasId)
fn remove_joining_room(&self, identifier: &RoomOrAliasId)
Remove the given room identifier from the rooms we are currently joining.
Sourcefn add_joining_room(&self, identifier: OwnedRoomOrAliasId)
fn add_joining_room(&self, identifier: OwnedRoomOrAliasId)
Add the given room identified to the rooms we are currently joining.
Sourcefn remove_or_replace_joining_room(
&self,
identifier: &RoomOrAliasId,
room_id: &RoomId,
)
fn remove_or_replace_joining_room( &self, identifier: &RoomOrAliasId, room_id: &RoomId, )
Remove the given room identifier from the rooms we are currently joining and replace it with the given room ID if the room is not in the list yet.
Sourcepub(super) fn add_tombstoned_room(&self, room_id: OwnedRoomId)
pub(super) fn add_tombstoned_room(&self, room_id: OwnedRoomId)
Add a room that was tombstoned but for which we have not joined the successor yet.
Sourcefn items_added(&self, added: usize)
fn items_added(&self, added: usize)
Handle when items were added to the list.
Sourcepub(super) fn handle_room_updates(&self, rooms: RoomUpdates)
pub(super) fn handle_room_updates(&self, rooms: RoomUpdates)
Handle room updates received via sync.
Sourcepub(super) async fn join_by_id_or_alias(
&self,
identifier: OwnedRoomOrAliasId,
via: Vec<OwnedServerName>,
) -> Result<OwnedRoomId, String>
pub(super) async fn join_by_id_or_alias( &self, identifier: OwnedRoomOrAliasId, via: Vec<OwnedServerName>, ) -> Result<OwnedRoomId, String>
Join the room with the given identifier.
Trait Implementations§
Source§impl DerivedObjectProperties for RoomList
impl DerivedObjectProperties for RoomList
Source§fn derived_properties() -> &'static [ParamSpec]
fn derived_properties() -> &'static [ParamSpec]
Source§fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
ObjectImpl
but auto-generated by the Properties
macro
to allow handling more complex use-cases.Source§fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
ObjectImpl
but auto-generated by the Properties
macro
to allow handling more complex use-cases.Source§impl ListModelImpl for RoomList
impl ListModelImpl for RoomList
Source§impl ObjectImpl for RoomList
impl ObjectImpl for RoomList
Source§fn constructed(&self)
fn constructed(&self)
Source§fn properties() -> &'static [ParamSpec]
fn properties() -> &'static [ParamSpec]
Source§fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
Source§fn notify(&self, pspec: &ParamSpec)
fn notify(&self, pspec: &ParamSpec)
self.notify("property")
.fn dispatch_properties_changed(&self, pspecs: &[ParamSpec])
Source§impl ObjectSubclass for RoomList
impl ObjectSubclass for RoomList
Source§type ParentType = Object
type ParentType = Object
Source§type Interfaces = (ListModel,)
type Interfaces = (ListModel,)
Source§const ALLOW_NAME_CONFLICT: bool = false
const ALLOW_NAME_CONFLICT: bool = false
Source§fn type_init(_type_: &mut InitializingType<Self>)
fn type_init(_type_: &mut InitializingType<Self>)
Source§fn class_init(_klass: &mut Self::Class)
fn class_init(_klass: &mut Self::Class)
Source§fn with_class(_klass: &Self::Class) -> Self
fn with_class(_klass: &Self::Class) -> Self
Source§fn instance_init(_obj: &InitializingObject<Self>)
fn instance_init(_obj: &InitializingObject<Self>)
Auto Trait Implementations§
impl !Freeze for RoomList
impl !RefUnwindSafe for RoomList
impl !Send for RoomList
impl !Sync for RoomList
impl Unpin for RoomList
impl !UnwindSafe for RoomList
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ListModelImplExt for Twhere
T: ListModelImpl,
impl<T> ListModelImplExt for Twhere
T: ListModelImpl,
fn parent_item_type(&self) -> Type
fn parent_n_items(&self) -> u32
fn parent_item(&self, position: u32) -> Option<Object>
Source§impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
Source§fn parent_constructed(&self)
fn parent_constructed(&self)
glib::Object::constructed()
.Source§fn parent_notify(&self, pspec: &ParamSpec)
fn parent_notify(&self, pspec: &ParamSpec)
glib::Object::notify()
.Source§fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
glib::Object::dispatch_properties_changed()
.Source§fn signal_chain_from_overridden(
&self,
token: &SignalClassHandlerToken,
values: &[Value],
) -> Option<Value>
fn signal_chain_from_overridden( &self, token: &SignalClassHandlerToken, values: &[Value], ) -> Option<Value>
Source§impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
Source§fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
Source§fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
Source§fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
Source§fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
Source§fn ref_counted(&self) -> ObjectImplRef<T>
fn ref_counted(&self) -> ObjectImplRef<T>
self
.