pub struct Room {Show 37 fields
pub matrix_room: OnceCell<Room>,
pub session: WeakRef<Session>,
pub room_id_string: PhantomData<String>,
pub aliases: RoomAliases,
pub version: PhantomData<String>,
pub federated: PhantomData<bool>,
pub name: PhantomData<Option<String>>,
pub has_avatar: Cell<bool>,
pub category: Cell<RoomType>,
pub timeline: OnceCell<Timeline>,
pub own_member: OnceCell<Member>,
pub members: WeakRef<MemberList>,
pub joined_members_count: Cell<u64>,
pub inviter: RefCell<Option<Member>>,
pub permissions: Permissions,
pub latest_activity: Cell<u64>,
pub is_read: Cell<bool>,
pub highlight: Cell<HighlightFlags>,
pub predecessor_id: OnceCell<OwnedRoomId>,
pub predecessor_id_string: PhantomData<Option<String>>,
pub successor_id: OnceCell<OwnedRoomId>,
pub successor_id_string: PhantomData<Option<String>>,
pub successor: WeakRef<Room>,
pub verification: BoundObjectWeakRef<IdentityVerification>,
pub is_encrypted: Cell<bool>,
pub typing_list: TypingList,
pub is_direct: Cell<bool>,
pub direct_member: RefCell<Option<Member>>,
pub notification_count: PhantomData<u64>,
pub topic: PhantomData<Option<String>>,
pub topic_linkified: RefCell<Option<String>>,
pub is_tombstoned: PhantomData<bool>,
pub notifications_setting: Cell<NotificationsRoomSetting>,
pub join_rule: JoinRule,
pub guests_allowed: Cell<bool>,
pub history_visibility: Cell<HistoryVisibilityValue>,
pub typing_drop_guard: OnceCell<EventHandlerDropGuard>,
}
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.
version: PhantomData<String>
The version of this room.
federated: PhantomData<bool>
Whether this room is federated.
name: PhantomData<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.
category: Cell<RoomType>
The category of this room.
timeline: OnceCell<Timeline>
The timeline of this room.
own_member: OnceCell<Member>
The member corresponding to our own user.
members: WeakRef<MemberList>
The members of this room.
joined_members_count: Cell<u64>
The number of joined members in the room, according to the homeserver.
inviter: RefCell<Option<Member>>
The user who sent the invite to this room.
This is only set when this room is an invitation.
permissions: Permissions
The permissions of our own user in 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.
highlight: Cell<HighlightFlags>
The highlight state of the room.
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.
verification: BoundObjectWeakRef<IdentityVerification>
An ongoing identity verification in this room.
is_encrypted: Cell<bool>
Whether this room is encrypted.
typing_list: TypingList
The list of members currently typing in this room.
is_direct: Cell<bool>
Whether this room is a direct chat.
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.
notification_count: PhantomData<u64>
The number of unread notifications of this room.
topic: PhantomData<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.
is_tombstoned: PhantomData<bool>
Whether this room has been upgraded.
notifications_setting: Cell<NotificationsRoomSetting>
The notifications settings for this room.
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.
typing_drop_guard: OnceCell<EventHandlerDropGuard>
Implementations§
source§impl Room
impl Room
sourcefn register_type()
fn register_type()
Registers the type only once.
source§impl Room
impl Room
sourcefn set_session(&self, session: Session)
fn set_session(&self, session: Session)
Set the current session
sourcepub fn matrix_room(&self) -> &MatrixRoom
pub fn matrix_room(&self) -> &MatrixRoom
The room API of the SDK.
sourcefn room_id_string(&self) -> String
fn room_id_string(&self) -> String
The room ID of this room, as a string.
sourcefn name(&self) -> Option<String>
fn name(&self) -> Option<String>
The name of this room.
This can be empty, the display name should be used instead in the interface.
sourcepub fn set_has_avatar(&self, has_avatar: bool)
pub fn set_has_avatar(&self, has_avatar: bool)
Set whether this room has an avatar explicitly set.
sourcefn notification_count(&self) -> u64
fn notification_count(&self) -> u64
The number of unread notifications of this room.
sourcepub(super) fn update_topic(&self)
pub(super) fn update_topic(&self)
Update the topic of this room.
sourcefn is_tombstoned(&self) -> bool
fn is_tombstoned(&self) -> bool
Whether this room was tombstoned.
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 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_verification(&self, verification: Option<IdentityVerification>)
fn set_verification(&self, verification: Option<IdentityVerification>)
Set an ongoing verification in this room.
sourcefn set_notifications_setting(&self, setting: NotificationsRoomSetting)
fn set_notifications_setting(&self, setting: NotificationsRoomSetting)
Set the notifications setting for this room.
sourcepub(super) async fn watch_send_queue(&self)
pub(super) 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
§type Interfaces = ()
type Interfaces = ()
§type Class = ClassStruct<Room>
type Class = ClassStruct<Room>
§type Instance = InstanceStruct<Room>
type Instance = InstanceStruct<Room>
§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> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
source§fn null_value() -> T
fn null_value() -> T
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
.