pub struct SyncTimelineEvent {
pub event: Raw<AnySyncTimelineEvent>,
pub encryption_info: Option<EncryptionInfo>,
pub push_actions: Vec<Action>,
}
Expand description
A customized version of a room event coming from a sync that holds optional encryption info.
Fields§
§event: Raw<AnySyncTimelineEvent>
The actual event.
encryption_info: Option<EncryptionInfo>
The encryption info about the event. Will be None
if the event was not
encrypted.
push_actions: Vec<Action>
The push actions associated with this event.
Implementations§
source§impl SyncTimelineEvent
impl SyncTimelineEvent
sourcepub fn new(event: Raw<AnySyncTimelineEvent>) -> Self
pub fn new(event: Raw<AnySyncTimelineEvent>) -> Self
Create a new SyncTimelineEvent
from the given raw event.
This is a convenience constructor for when you don’t need to set
encryption_info
or push_action
, for example inside a test.
sourcepub fn event_id(&self) -> Option<OwnedEventId>
pub fn event_id(&self) -> Option<OwnedEventId>
Get the event id of this SyncTimelineEvent
if the event has any valid
id.
Trait Implementations§
source§impl Clone for SyncTimelineEvent
impl Clone for SyncTimelineEvent
source§fn clone(&self) -> SyncTimelineEvent
fn clone(&self) -> SyncTimelineEvent
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 moresource§impl Debug for SyncTimelineEvent
impl Debug for SyncTimelineEvent
source§impl<'de> Deserialize<'de> for SyncTimelineEvent
impl<'de> Deserialize<'de> for SyncTimelineEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Raw<AnySyncTimelineEvent>> for SyncTimelineEvent
impl From<Raw<AnySyncTimelineEvent>> for SyncTimelineEvent
source§fn from(inner: Raw<AnySyncTimelineEvent>) -> Self
fn from(inner: Raw<AnySyncTimelineEvent>) -> Self
Converts to this type from the input type.
source§impl From<TimelineEvent> for SyncTimelineEvent
impl From<TimelineEvent> for SyncTimelineEvent
source§fn from(o: TimelineEvent) -> Self
fn from(o: TimelineEvent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SyncTimelineEvent
impl RefUnwindSafe for SyncTimelineEvent
impl Send for SyncTimelineEvent
impl Sync for SyncTimelineEvent
impl Unpin for SyncTimelineEvent
impl UnwindSafe for SyncTimelineEvent
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