pub struct SyncTimelineEvent {
pub event: Raw<AnySyncTimelineEvent>,
pub encryption_info: Option<EncryptionInfo>,
pub push_actions: Vec<Action>,
pub unsigned_encryption_info: Option<BTreeMap<UnsignedEventLocation, UnsignedDecryptionResult>>,
}
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.
unsigned_encryption_info: Option<BTreeMap<UnsignedEventLocation, UnsignedDecryptionResult>>
The encryption info about the events bundled in the unsigned
object.
Will be None
if no bundled event was encrypted.
Implementations§
source§impl SyncTimelineEvent
impl SyncTimelineEvent
sourcepub fn new(event: Raw<AnySyncTimelineEvent>) -> SyncTimelineEvent
pub fn new(event: Raw<AnySyncTimelineEvent>) -> SyncTimelineEvent
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 new_with_push_actions(
event: Raw<AnySyncTimelineEvent>,
push_actions: Vec<Action>,
) -> SyncTimelineEvent
pub fn new_with_push_actions( event: Raw<AnySyncTimelineEvent>, push_actions: Vec<Action>, ) -> SyncTimelineEvent
Create a new SyncTimelineEvent
from the given raw event and push
actions.
This is a convenience constructor for when you don’t need to set
encryption_info
, 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
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SyncTimelineEvent
Available on non-tarpaulin_include
only.
impl Debug for SyncTimelineEvent
tarpaulin_include
only.source§impl<'de> Deserialize<'de> for SyncTimelineEvent
impl<'de> Deserialize<'de> for SyncTimelineEvent
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SyncTimelineEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SyncTimelineEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl From<Raw<AnySyncTimelineEvent>> for SyncTimelineEvent
impl From<Raw<AnySyncTimelineEvent>> for SyncTimelineEvent
source§fn from(inner: Raw<AnySyncTimelineEvent>) -> SyncTimelineEvent
fn from(inner: Raw<AnySyncTimelineEvent>) -> SyncTimelineEvent
source§impl From<TimelineEvent> for SyncTimelineEvent
impl From<TimelineEvent> for SyncTimelineEvent
source§fn from(o: TimelineEvent) -> SyncTimelineEvent
fn from(o: TimelineEvent) -> SyncTimelineEvent
source§impl Serialize for SyncTimelineEvent
impl Serialize for SyncTimelineEvent
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
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)
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>
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