pub struct Room { /* private fields */ }
Expand description

The underlying room data structure collecting state for joined, left and invited rooms.

Implementations

Get the unique room id of the room.

Get our own user id.

Get the type of the room.

Whether this room’s RoomType is m.space.

Get the unread notification counts.

Check if the room has it’s members fully synced.

Members might be missing if lazy member loading was enabled for the sync.

Returns true if no members are missing, false otherwise.

Get the prev_batch token that was received from the last sync. May be None if the last sync contained the full room history.

Get the avatar url of this room.

Get the canonical alias of this room.

Get the canonical alias of this room.

Get the m.room.create content of this room.

This usually isn’t optional but some servers might not send an m.room.create event as the first event for a given room, thus this can be optional.

It can also be redacted in current room versions, leaving only the creator field.

Is this room considered a direct message.

If this room is a direct message, get the members that we’re sharing the room with.

Note: The member list might have been modified in the meantime and the targets might not even be in the room anymore. This setting should only be considered as guidance.

Is the room encrypted.

Get the m.room.encryption content that enabled end to end encryption in the room.

Get the guest access policy of this room.

Get the history visibility policy of this room.

Is the room considered to be public.

Get the join rule policy of this room.

Get the maximum power level that this room contains.

This is useful if one wishes to normalize the power levels, e.g. from 0-100 where 100 would be the max power level.

Get the m.room.name of this room.

Has the room been tombstoned.

Get the m.room.tombstone content of this room if there is one.

Get the topic of the room.

Calculate the canonical display name of the room, taking into account its name, aliases and members.

The display name is calculated according to this algorithm.

Get the list of users ids that are considered to be joined members of this room.

Get the all RoomMembers of this room that are known to the store.

Get the list of RoomMembers that are considered to be joined members of this room.

Get the list of RoomMembers that are considered to be joined or invited members of this room.

Clone the inner RoomInfo

Update the summary with given RoomInfo

Get the RoomMember with the given user_id.

Returns None if the member was never part of this room, otherwise return a RoomMember that can be in a joined, invited, left, banned state.

Get the Tags for this room.

Get the read receipt as a EventId and Receipt tuple for the given user_id in this room.

Get the read receipts as a list of UserId and Receipt tuples for the given event_id in this room.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more