pub enum PossibleLatestEvent<'a> {
YesRoomMessage(&'a SyncRoomMessageEvent),
YesSticker(&'a SyncStickerEvent),
YesPoll(&'a SyncUnstablePollStartEvent),
YesCallInvite(&'a SyncCallInviteEvent),
YesCallNotify(&'a SyncCallNotifyEvent),
YesKnockedStateEvent(&'a SyncRoomMemberEvent),
NoUnsupportedEventType,
NoUnsupportedMessageLikeType,
NoEncrypted,
}
Expand description
Represents a decision about whether an event could be stored as the latest event in a room. Variants starting with Yes indicate that this message could be stored, and provide the inner event information, and those starting with a No indicate that it could not, and give a reason.
Variants§
YesRoomMessage(&'a SyncRoomMessageEvent)
This message is suitable - it is an m.room.message
YesSticker(&'a SyncStickerEvent)
This message is suitable - it is a sticker
YesPoll(&'a SyncUnstablePollStartEvent)
This message is suitable - it is a poll
YesCallInvite(&'a SyncCallInviteEvent)
This message is suitable - it is a call invite
YesCallNotify(&'a SyncCallNotifyEvent)
This message is suitable - it’s a call notification
YesKnockedStateEvent(&'a SyncRoomMemberEvent)
This state event is suitable - it’s a knock membership change that can be handled by the current user.
NoUnsupportedEventType
Not suitable - it’s a state event
NoUnsupportedMessageLikeType
Not suitable - it’s not a m.room.message or an edit/replacement
NoEncrypted
Not suitable - it’s encrypted
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PossibleLatestEvent<'a>
impl<'a> RefUnwindSafe for PossibleLatestEvent<'a>
impl<'a> Send for PossibleLatestEvent<'a>
impl<'a> Sync for PossibleLatestEvent<'a>
impl<'a> Unpin for PossibleLatestEvent<'a>
impl<'a> UnwindSafe for PossibleLatestEvent<'a>
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
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>
Converts
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>
Converts
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 more