pub struct RoomCreateEvent<E>(/* private fields */)
where
E: Event;
Available on crate feature
state-res
only.Expand description
A helper type for an Event
of type m.room.create
.
This is a type that deserializes each field lazily, when requested.
Implementations§
Source§impl<E> RoomCreateEvent<E>where
E: Event,
impl<E> RoomCreateEvent<E>where
E: Event,
Sourcepub fn new(event: E) -> RoomCreateEvent<E>
pub fn new(event: E) -> RoomCreateEvent<E>
Construct a new RoomCreateEvent
around the given event.
Sourcepub fn room_version(&self) -> Result<RoomVersionId, String>
pub fn room_version(&self) -> Result<RoomVersionId, String>
The version of the room.
Sourcepub fn creators(
&self,
rules: &AuthorizationRules,
) -> Result<HashSet<OwnedUserId>, String>
pub fn creators( &self, rules: &AuthorizationRules, ) -> Result<HashSet<OwnedUserId>, String>
The creators of the room.
If the use_room_create_sender
field of AuthorizationRules
is set, the creator is the
sender of this m.room.create
event, otherwise it is deserialized from the creator
field of this event’s content. Additionally if the explicitly_privilege_room_creators
field of AuthorizationRules
is set, any additional user IDs in additional_creators
, if
present, will also be considered creators.
Trait Implementations§
Source§impl<E> Clone for RoomCreateEvent<E>
impl<E> Clone for RoomCreateEvent<E>
Source§fn clone(&self) -> RoomCreateEvent<E>
fn clone(&self) -> RoomCreateEvent<E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<E> Debug for RoomCreateEvent<E>
impl<E> Debug for RoomCreateEvent<E>
Auto Trait Implementations§
impl<E> Freeze for RoomCreateEvent<E>where
E: Freeze,
impl<E> RefUnwindSafe for RoomCreateEvent<E>where
E: RefUnwindSafe,
impl<E> Send for RoomCreateEvent<E>where
E: Send,
impl<E> Sync for RoomCreateEvent<E>where
E: Sync,
impl<E> Unpin for RoomCreateEvent<E>where
E: Unpin,
impl<E> UnwindSafe for RoomCreateEvent<E>where
E: UnwindSafe,
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
Mutably borrows from an owned value. Read more