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,
RtcNotification,
}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: StateEventTypeThe event type.
CallInvite
An m.call.invite event
RtcNotification
An m.rtc.notification event
Implementations§
Source§impl TimelineItemContent
impl TimelineItemContent
pub fn as_msglike(&self) -> Option<&MsgLikeContent>
Sourcepub fn as_live_location_state(&self) -> Option<&LiveLocationState>
pub fn as_live_location_state(&self) -> Option<&LiveLocationState>
If self is of the MsgLike variant with a
LiveLocation kind, return the inner
LiveLocationState.
Sourcepub fn is_live_location(&self) -> bool
pub fn is_live_location(&self) -> bool
Check whether this item’s content is a
LiveLocation.
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 message in a thread.
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) -> Option<&ReactionsByKeyBySender>
pub fn reactions(&self) -> Option<&ReactionsByKeyBySender>
Return the reactions, grouped by key and then by sender, for a given content.
Sourcepub fn thread_summary(&self) -> Option<ThreadSummary>
pub fn thread_summary(&self) -> Option<ThreadSummary>
Information about the thread this item is the root for.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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 UnsafeUnpin 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
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
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>
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>
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