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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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