pub struct RoomCreateEvent<E: Event>(/* private fields */);
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: Event> RoomCreateEvent<E>
impl<E: Event> RoomCreateEvent<E>
Sourcepub fn room_version(&self) -> Result<RoomVersionId, String>
pub fn room_version(&self) -> Result<RoomVersionId, String>
The version of the room.
Sourcepub fn creator(
&self,
rules: &AuthorizationRules,
) -> Result<Cow<'_, UserId>, String>
pub fn creator( &self, rules: &AuthorizationRules, ) -> Result<Cow<'_, UserId>, String>
The creator 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.
Trait Implementations§
Source§impl<E: Clone + Event> Clone for RoomCreateEvent<E>
impl<E: Clone + Event> Clone for RoomCreateEvent<E>
Source§fn clone(&self) -> RoomCreateEvent<E>
fn clone(&self) -> RoomCreateEvent<E>
Returns a copy 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 moreAuto 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