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,
}
Available on (crate features
e2e-encryption
or experimental-sliding-sync
) and crate feature e2e-encryption
only.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
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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