Enum AnySyncTimelineEvent
pub enum AnySyncTimelineEvent {
MessageLike(AnySyncMessageLikeEvent),
State(AnySyncStateEvent),
}
Expand description
Any sync room event.
Sync room events are room event without a room_id
, as returned in /sync
responses.
Variants§
MessageLike(AnySyncMessageLikeEvent)
Any sync message-like event.
State(AnySyncStateEvent)
Any sync state event.
Implementations§
§impl AnySyncTimelineEvent
impl AnySyncTimelineEvent
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
Returns this event’s origin_server_ts
field.
pub fn transaction_id(&self) -> Option<&TransactionId>
pub fn transaction_id(&self) -> Option<&TransactionId>
Returns this event’s transaction_id
from inside unsigned
, if there is one.
pub fn event_type(&self) -> TimelineEventType
pub fn event_type(&self) -> TimelineEventType
Returns this event’s type
.
pub fn into_full_event(self, room_id: OwnedRoomId) -> AnyTimelineEvent
pub fn into_full_event(self, room_id: OwnedRoomId) -> AnyTimelineEvent
Converts self
to an AnyTimelineEvent
by adding the given a room ID.
Trait Implementations§
§impl Clone for AnySyncTimelineEvent
impl Clone for AnySyncTimelineEvent
§fn clone(&self) -> AnySyncTimelineEvent
fn clone(&self) -> AnySyncTimelineEvent
Returns a duplicate 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 more§impl Debug for AnySyncTimelineEvent
impl Debug for AnySyncTimelineEvent
§impl<'de> Deserialize<'de> for AnySyncTimelineEvent
impl<'de> Deserialize<'de> for AnySyncTimelineEvent
§fn deserialize<D>(
deserializer: D,
) -> Result<AnySyncTimelineEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<AnySyncTimelineEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<AnySyncMessageLikeEvent> for AnySyncTimelineEvent
impl From<AnySyncMessageLikeEvent> for AnySyncTimelineEvent
§fn from(c: AnySyncMessageLikeEvent) -> AnySyncTimelineEvent
fn from(c: AnySyncMessageLikeEvent) -> AnySyncTimelineEvent
Converts to this type from the input type.
§impl From<AnySyncStateEvent> for AnySyncTimelineEvent
impl From<AnySyncStateEvent> for AnySyncTimelineEvent
§fn from(c: AnySyncStateEvent) -> AnySyncTimelineEvent
fn from(c: AnySyncStateEvent) -> AnySyncTimelineEvent
Converts to this type from the input type.
§impl From<AnyTimelineEvent> for AnySyncTimelineEvent
impl From<AnyTimelineEvent> for AnySyncTimelineEvent
§fn from(ev: AnyTimelineEvent) -> AnySyncTimelineEvent
fn from(ev: AnyTimelineEvent) -> AnySyncTimelineEvent
Converts to this type from the input type.
impl JsonCastable<AnySyncTimelineEvent> for AnyMessageLikeEvent
impl JsonCastable<AnySyncTimelineEvent> for AnyStateEvent
impl JsonCastable<AnySyncTimelineEvent> for AnySyncMessageLikeEvent
impl JsonCastable<AnySyncTimelineEvent> for AnySyncStateEvent
impl JsonCastable<AnySyncTimelineEvent> for AnyTimelineEvent
impl<C> JsonCastable<AnySyncTimelineEvent> for MessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,
impl<C> JsonCastable<AnySyncTimelineEvent> for OriginalMessageLikeEvent<C>where
C: MessageLikeEventContent,
impl JsonCastable<AnySyncTimelineEvent> for OriginalRoomRedactionEvent
impl<C> JsonCastable<AnySyncTimelineEvent> for OriginalStateEvent<C>where
C: StaticStateEventContent,
impl<C> JsonCastable<AnySyncTimelineEvent> for OriginalSyncMessageLikeEvent<C>where
C: MessageLikeEventContent,
impl JsonCastable<AnySyncTimelineEvent> for OriginalSyncRoomRedactionEvent
impl<C> JsonCastable<AnySyncTimelineEvent> for OriginalSyncStateEvent<C>where
C: StaticStateEventContent,
impl<C> JsonCastable<AnySyncTimelineEvent> for RedactedMessageLikeEvent<C>where
C: RedactedMessageLikeEventContent,
impl JsonCastable<AnySyncTimelineEvent> for RedactedRoomRedactionEvent
impl<C> JsonCastable<AnySyncTimelineEvent> for RedactedStateEvent<C>where
C: RedactedStateEventContent,
impl<C> JsonCastable<AnySyncTimelineEvent> for RedactedSyncMessageLikeEvent<C>where
C: RedactedMessageLikeEventContent,
impl JsonCastable<AnySyncTimelineEvent> for RedactedSyncRoomRedactionEvent
impl<C> JsonCastable<AnySyncTimelineEvent> for RedactedSyncStateEvent<C>where
C: RedactedStateEventContent,
impl JsonCastable<AnySyncTimelineEvent> for RoomRedactionEvent
impl<C> JsonCastable<AnySyncTimelineEvent> for StateEvent<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
impl<C> JsonCastable<AnySyncTimelineEvent> for SyncMessageLikeEvent<C>where
C: MessageLikeEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedMessageLikeEventContent,
impl JsonCastable<AnySyncTimelineEvent> for SyncRoomRedactionEvent
impl<C> JsonCastable<AnySyncTimelineEvent> for SyncStateEvent<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
impl JsonCastable<Map<String, Value>> for AnySyncTimelineEvent
impl SyncEvent for AnySyncTimelineEvent
Auto Trait Implementations§
impl Freeze for AnySyncTimelineEvent
impl RefUnwindSafe for AnySyncTimelineEvent
impl Send for AnySyncTimelineEvent
impl Sync for AnySyncTimelineEvent
impl Unpin for AnySyncTimelineEvent
impl UnwindSafe for AnySyncTimelineEvent
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> 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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&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§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