pub enum TimelineItemContent {
Message(Message),
RedactedMessage,
Sticker(Sticker),
UnableToDecrypt(EncryptedMessage),
MembershipChange(RoomMembershipChange),
ProfileChange(MemberProfileChange),
OtherState(OtherState),
FailedToParseMessageLike {
event_type: MessageLikeEventType,
error: Arc<Error>,
},
FailedToParseState {
event_type: StateEventType,
state_key: String,
error: Arc<Error>,
},
Poll(PollState),
CallInvite,
CallNotify,
}
Expand description
The content of an EventTimelineItem
.
Variants§
Message(Message)
An m.room.message
event or extensible event, including edits.
RedactedMessage
A redacted message.
Sticker(Sticker)
An m.sticker
event.
UnableToDecrypt(EncryptedMessage)
An m.room.encrypted
event that could not be decrypted.
MembershipChange(RoomMembershipChange)
A room membership change.
ProfileChange(MemberProfileChange)
A room member profile change.
OtherState(OtherState)
Another state event.
FailedToParseMessageLike
A message-like event that failed to deserialize.
FailedToParseState
A state event that failed to deserialize.
Fields
§
event_type: StateEventType
The event type
.
Poll(PollState)
An m.poll.start
event.
CallInvite
An m.call.invite
event
CallNotify
An m.call.notify
event
Implementations§
Source§impl TimelineItemContent
impl TimelineItemContent
Sourcepub fn as_message(&self) -> Option<&Message>
pub fn as_message(&self) -> Option<&Message>
Sourcepub fn as_unable_to_decrypt(&self) -> Option<&EncryptedMessage>
pub fn as_unable_to_decrypt(&self) -> Option<&EncryptedMessage>
If self
is of the UnableToDecrypt
variant,
return the inner EncryptedMessage
.
Trait Implementations§
Source§impl Clone for TimelineItemContent
impl Clone for TimelineItemContent
Source§fn clone(&self) -> TimelineItemContent
fn clone(&self) -> TimelineItemContent
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 Freeze for TimelineItemContent
impl !RefUnwindSafe for TimelineItemContent
impl Send for TimelineItemContent
impl Sync for TimelineItemContent
impl Unpin for TimelineItemContent
impl !UnwindSafe for TimelineItemContent
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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