pub struct RoomMemberEvent<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.member
.
This is a type that deserializes each field lazily, as requested.
Implementations§
Source§impl<E> RoomMemberEvent<E>where
E: Event,
impl<E> RoomMemberEvent<E>where
E: Event,
Sourcepub fn new(event: E) -> RoomMemberEvent<E>
pub fn new(event: E) -> RoomMemberEvent<E>
Construct a new RoomMemberEvent
around the given event.
Sourcepub fn membership(&self) -> Result<MembershipState, String>
pub fn membership(&self) -> Result<MembershipState, String>
The membership of the user.
If this is a join
event, the ID of a user on the homeserver that authorized it.
Trait Implementations§
Source§impl<E> Clone for RoomMemberEvent<E>
impl<E> Clone for RoomMemberEvent<E>
Source§fn clone(&self) -> RoomMemberEvent<E>
fn clone(&self) -> RoomMemberEvent<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 moreSource§impl<E> Debug for RoomMemberEvent<E>
impl<E> Debug for RoomMemberEvent<E>
Auto Trait Implementations§
impl<E> Freeze for RoomMemberEvent<E>where
E: Freeze,
impl<E> RefUnwindSafe for RoomMemberEvent<E>where
E: RefUnwindSafe,
impl<E> Send for RoomMemberEvent<E>where
E: Send,
impl<E> Sync for RoomMemberEvent<E>where
E: Sync,
impl<E> Unpin for RoomMemberEvent<E>where
E: Unpin,
impl<E> UnwindSafe for RoomMemberEvent<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