pub struct Room {Show 39 fields
matrix_room: OnceCell<Room>,
session: WeakRef<Session>,
room_id_string: PhantomData<String>,
aliases: RoomAliases,
name: RefCell<Option<String>>,
has_avatar: Cell<bool>,
topic: RefCell<Option<String>>,
topic_linkified: RefCell<Option<String>>,
category: Cell<RoomCategory>,
is_direct: Cell<bool>,
is_tombstoned: Cell<bool>,
pub(super) predecessor_id: OnceCell<OwnedRoomId>,
predecessor_id_string: PhantomData<Option<String>>,
pub(super) successor_id: OnceCell<OwnedRoomId>,
successor_id_string: PhantomData<Option<String>>,
successor: WeakRef<Room>,
pub(super) members: WeakRef<MemberList>,
members_drop_guard: OnceCell<EventHandlerDropGuard>,
joined_members_count: Cell<u64>,
own_member: OnceCell<Member>,
inviter: RefCell<Option<Member>>,
direct_member: RefCell<Option<Member>>,
timeline: OnceCell<Timeline>,
latest_activity: Cell<u64>,
is_read: Cell<bool>,
notification_count: Cell<u64>,
has_notifications: Cell<bool>,
highlight: Cell<HighlightFlags>,
is_encrypted: Cell<bool>,
join_rule: JoinRule,
guests_allowed: Cell<bool>,
history_visibility: Cell<HistoryVisibilityValue>,
version: PhantomData<String>,
federated: PhantomData<bool>,
typing_list: TypingList,
typing_drop_guard: OnceCell<EventHandlerDropGuard>,
notifications_setting: Cell<NotificationsRoomSetting>,
permissions: Permissions,
verification: BoundObjectWeakRef<IdentityVerification>,
}
Fields§
§matrix_room: OnceCell<Room>
The room API of the SDK.
session: WeakRef<Session>
The current session.
room_id_string: PhantomData<String>
The ID of this room, as a string.
aliases: RoomAliases
The aliases of this room.
name: RefCell<Option<String>>
The name that is set for this room.
This can be empty, the display name should be used instead in the interface.
has_avatar: Cell<bool>
Whether this room has an avatar explicitly set.
This is false
if there is no avatar or if the avatar is the one
from the other member.
topic: RefCell<Option<String>>
The topic of this room.
topic_linkified: RefCell<Option<String>>
The linkified topic of this room.
This is the string that should be used in the interface when markup is allowed.
category: Cell<RoomCategory>
The category of this room.
is_direct: Cell<bool>
Whether this room is a direct chat.
is_tombstoned: Cell<bool>
Whether this room has been upgraded.
predecessor_id: OnceCell<OwnedRoomId>
The ID of the room that was upgraded and that this one replaces.
predecessor_id_string: PhantomData<Option<String>>
The ID of the room that was upgraded and that this one replaces, as a string.
successor_id: OnceCell<OwnedRoomId>
The ID of the successor of this Room, if this room was upgraded.
successor_id_string: PhantomData<Option<String>>
The ID of the successor of this Room, if this room was upgraded, as a string.
successor: WeakRef<Room>
The successor of this Room, if this room was upgraded and the successor was joined.
members: WeakRef<MemberList>
The members of this room.
members_drop_guard: OnceCell<EventHandlerDropGuard>
§joined_members_count: Cell<u64>
The number of joined members in the room, according to the homeserver.
own_member: OnceCell<Member>
The member corresponding to our own user.
inviter: RefCell<Option<Member>>
The user who sent the invite to this room.
This is only set when this room is an invitation.
direct_member: RefCell<Option<Member>>
The other member of the room, if this room is a direct chat and there is only one other member.
timeline: OnceCell<Timeline>
The timeline of this room.
latest_activity: Cell<u64>
The timestamp of the room’s latest activity.
This is the timestamp of the latest event that counts as possibly unread.
If it is not known, it will return 0
.
is_read: Cell<bool>
Whether all messages of this room are read.
notification_count: Cell<u64>
The number of unread notifications of this room.
has_notifications: Cell<bool>
whether this room has unread notifications.
highlight: Cell<HighlightFlags>
The highlight state of the room.
is_encrypted: Cell<bool>
Whether this room is encrypted.
join_rule: JoinRule
The join rule of this room.
guests_allowed: Cell<bool>
Whether guests are allowed.
history_visibility: Cell<HistoryVisibilityValue>
The visibility of the history.
version: PhantomData<String>
The version of this room.
federated: PhantomData<bool>
Whether this room is federated.
typing_list: TypingList
The list of members currently typing in this room.
typing_drop_guard: OnceCell<EventHandlerDropGuard>
§notifications_setting: Cell<NotificationsRoomSetting>
The notifications settings for this room.
permissions: Permissions
The permissions of our own user in this room
verification: BoundObjectWeakRef<IdentityVerification>
An ongoing identity verification in this room.
Implementations§
source§impl Room
impl Room
sourcefn register_type()
fn register_type()
Registers the type only once.
source§impl Room
impl Room
sourcepub(super) fn init(
&self,
matrix_room: MatrixRoom,
metainfo: Option<RoomMetainfo>,
)
pub(super) fn init( &self, matrix_room: MatrixRoom, metainfo: Option<RoomMetainfo>, )
Initialize this room.
sourcepub(super) fn matrix_room(&self) -> &MatrixRoom
pub(super) fn matrix_room(&self) -> &MatrixRoom
The room API of the SDK.
sourcefn set_session(&self, session: Session)
fn set_session(&self, session: Session)
Set the current session
sourcefn room_id_string(&self) -> String
fn room_id_string(&self) -> String
The ID of this room, as a string.
sourcefn update_name(&self)
fn update_name(&self)
Update the name of this room.
sourceasync fn update_display_name(&self)
async fn update_display_name(&self)
Load the display name from the SDK.
sourcefn set_has_avatar(&self, has_avatar: bool)
fn set_has_avatar(&self, has_avatar: bool)
Set whether this room has an avatar explicitly set.
sourcefn update_avatar(&self)
fn update_avatar(&self)
Update the avatar of the room.
sourcefn update_topic(&self)
fn update_topic(&self)
Update the topic of this room.
sourcepub(super) fn set_category(&self, category: RoomCategory)
pub(super) fn set_category(&self, category: RoomCategory)
Set the category of this room.
sourcepub(super) fn update_category(&self)
pub(super) fn update_category(&self)
Update the category from the SDK.
sourceasync fn set_is_direct(&self, is_direct: bool)
async fn set_is_direct(&self, is_direct: bool)
Set whether this room is a direct chat.
sourcepub(super) async fn update_is_direct(&self)
pub(super) async fn update_is_direct(&self)
Update whether the room is direct or not.
sourcefn update_tombstone(&self)
fn update_tombstone(&self)
Update the tombstone for this room.
sourcepub(super) fn update_successor(&self)
pub(super) fn update_successor(&self)
Update the successor of this room.
sourcefn predecessor_id_string(&self) -> Option<String>
fn predecessor_id_string(&self) -> Option<String>
The ID of the room that was upgraded and that this one replaces, as a string.
sourcefn load_predecessor(&self)
fn load_predecessor(&self)
Load the predecessor of this room.
sourcefn successor_id_string(&self) -> Option<String>
fn successor_id_string(&self) -> Option<String>
The ID of the successor of this room, if this room was upgraded.
sourcefn set_successor(&self, successor: &Room)
fn set_successor(&self, successor: &Room)
Set the successor of this room.
sourcefn watch_members(&self)
fn watch_members(&self)
Watch changes in the members list.
sourcefn handle_member_event(&self, event: SyncRoomMemberEvent)
fn handle_member_event(&self, event: SyncRoomMemberEvent)
Handle a member event received via sync
sourcefn set_joined_members_count(&self, count: u64)
fn set_joined_members_count(&self, count: u64)
Set the number of joined members in the room, according to the homeserver.
sourcefn own_member(&self) -> &Member
fn own_member(&self) -> &Member
The member corresponding to our own user.
sourceasync fn load_own_member(&self)
async fn load_own_member(&self)
Load our own member from the store.
sourceasync fn load_inviter(&self)
async fn load_inviter(&self)
Load the member that invited us to this room, when applicable.
sourcefn set_direct_member(&self, member: Option<Member>)
fn set_direct_member(&self, member: Option<Member>)
Set the other member of the room, if this room is a direct chat and there is only one other member..
sourceasync fn direct_user_id(&self) -> Option<OwnedUserId>
async fn direct_user_id(&self) -> Option<OwnedUserId>
The ID of the other user, if this is a direct chat and there is only one other user.
sourceasync fn update_direct_member(&self)
async fn update_direct_member(&self)
Update the other member of the room, if this room is a direct chat and there is only one other member.
sourcefn init_timeline(&self)
fn init_timeline(&self)
Initialize the timeline of this room.
sourcepub(super) fn set_latest_activity(&self, latest_activity: u64)
pub(super) fn set_latest_activity(&self, latest_activity: u64)
Set the timestamp of the room’s latest possibly unread event.
sourcefn set_is_read(&self, is_read: bool)
fn set_is_read(&self, is_read: bool)
Set whether all messages of this room are read.
sourceasync fn handle_read_change_trigger(&self)
async fn handle_read_change_trigger(&self)
Handle the trigger emitted when a read change might have occurred.
sourcefn set_highlight(&self, highlight: HighlightFlags)
fn set_highlight(&self, highlight: HighlightFlags)
Set how this room is highlighted.
sourcefn update_highlight(&self)
fn update_highlight(&self)
Update the highlight of the room from the current state.
sourcefn set_notification_count(&self, count: u64)
fn set_notification_count(&self, count: u64)
Set the number of unread notifications of this room.
sourcefn set_has_notifications(&self, has_notifications: bool)
fn set_has_notifications(&self, has_notifications: bool)
Set whether this room has unread notifications.
sourceasync fn update_is_encrypted(&self)
async fn update_is_encrypted(&self)
Update whether the room is encrypted from the SDK.
sourcefn update_guests_allowed(&self)
fn update_guests_allowed(&self)
Update whether guests are allowed.
sourcefn update_history_visibility(&self)
fn update_history_visibility(&self)
Update the visibility of the history.
sourcefn set_up_typing(&self)
fn set_up_typing(&self)
Start listening to typing events.
sourcefn update_typing_list(&self, typing_user_ids: Vec<OwnedUserId>)
fn update_typing_list(&self, typing_user_ids: Vec<OwnedUserId>)
Update the typing list with the given user IDs.
sourcefn set_notifications_setting(&self, setting: NotificationsRoomSetting)
fn set_notifications_setting(&self, setting: NotificationsRoomSetting)
Set the notifications setting for this room.
sourcefn set_verification(&self, verification: Option<IdentityVerification>)
fn set_verification(&self, verification: Option<IdentityVerification>)
Set an ongoing verification in this room.
sourcefn watch_room_info(&self)
fn watch_room_info(&self)
Watch the SDK’s room info for changes to the room state.
sourceasync fn update_with_room_info(&self, room_info: RoomInfo)
async fn update_with_room_info(&self, room_info: RoomInfo)
Update this room with the given SDK room info.
sourcepub(super) fn handle_ambiguity_changes<'a>(
&self,
changes: impl Iterator<Item = &'a AmbiguityChange>,
)
pub(super) fn handle_ambiguity_changes<'a>( &self, changes: impl Iterator<Item = &'a AmbiguityChange>, )
Handle changes in the ambiguity of members display names.
sourceasync fn watch_send_queue(&self)
async fn watch_send_queue(&self)
Watch errors in the send queue to try to handle them.
Trait Implementations§
source§impl DerivedObjectProperties for Room
impl DerivedObjectProperties for Room
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 ObjectImpl for Room
impl ObjectImpl for Room
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 constructed(&self)
fn constructed(&self)
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 Room
impl ObjectSubclass for Room
source§type Interfaces = ()
type Interfaces = ()
source§type ParentType = PillSource
type ParentType = PillSource
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>)
source§impl ObjectSubclassType for Room
impl ObjectSubclassType for Room
source§impl PillSourceImpl for Room
impl PillSourceImpl for Room
source§fn identifier(&self) -> String
fn identifier(&self) -> String
Auto Trait Implementations§
impl !Freeze for Room
impl !RefUnwindSafe for Room
impl !Send for Room
impl !Sync for Room
impl Unpin for Room
impl !UnwindSafe for Room
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> 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
.