pub enum TimelineItemContent {
MsgLike(MsgLikeContent),
MembershipChange(RoomMembershipChange),
ProfileChange(MemberProfileChange),
OtherState(OtherState),
FailedToParseMessageLike {
event_type: MessageLikeEventType,
error: Arc<Error>,
},
FailedToParseState {
event_type: StateEventType,
state_key: String,
error: Arc<Error>,
},
CallInvite,
CallNotify,
}
Expand description
The content of an EventTimelineItem
.
Variants§
MsgLike(MsgLikeContent)
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
.
CallInvite
An m.call.invite
event
CallNotify
An m.call.notify
event
Implementations§
Source§impl TimelineItemContent
impl TimelineItemContent
pub fn as_msglike(&self) -> Option<&MsgLikeContent>
Sourcepub fn as_message(&self) -> Option<&Message>
pub fn as_message(&self) -> Option<&Message>
Sourcepub fn is_message(&self) -> bool
pub fn is_message(&self) -> bool
Check whether this item’s content is a
Message
.
pub fn as_sticker(&self) -> Option<&Sticker>
Sourcepub fn is_sticker(&self) -> bool
pub fn is_sticker(&self) -> bool
Check whether this item’s content is a
Sticker
.
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
.
Sourcepub fn is_unable_to_decrypt(&self) -> bool
pub fn is_unable_to_decrypt(&self) -> bool
Check whether this item’s content is a
UnableToDecrypt
.
pub fn is_redacted(&self) -> bool
Sourcepub fn thread_root(&self) -> Option<OwnedEventId>
pub fn thread_root(&self) -> Option<OwnedEventId>
Event ID of the thread root, if this is a threaded message.
Sourcepub fn in_reply_to(&self) -> Option<InReplyToDetails>
pub fn in_reply_to(&self) -> Option<InReplyToDetails>
Get the event this message is replying to, if any.
Sourcepub fn reactions(&self) -> ReactionsByKeyBySender
pub fn reactions(&self) -> ReactionsByKeyBySender
Return the reactions, grouped by key and then by sender, for a given content.
pub fn with_reactions(&self, reactions: ReactionsByKeyBySender) -> Self
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, 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