Struct ruma_events::SyncStateEvent [−][src]
pub struct SyncStateEvent<C: StateEventContent> { pub content: C, pub event_id: EventId, pub sender: UserId, pub origin_server_ts: MilliSecondsSinceUnixEpoch, pub state_key: String, pub prev_content: Option<C>, pub unsigned: Unsigned, }
Expand description
A state event without a room_id
.
SyncStateEvent
implements the comparison traits using only
the event_id
field, a sorted list would be sorted lexicographically based on
the event’s EventId
.
Fields
content: C
Data specific to the event type.
event_id: EventId
The globally unique event identifier for the user who sent the event.
sender: UserId
The fully-qualified ID of the user who sent this event.
origin_server_ts: MilliSecondsSinceUnixEpoch
Timestamp in milliseconds on originating homeserver when this event was sent.
state_key: String
A unique key which defines the overwriting semantics for this piece of room state.
This is often an empty string, but some events send a UserId
to show
which user the event affects.
prev_content: Option<C>
Optional previous content for this event.
unsigned: Unsigned
Additional key-value pairs not signed by the homeserver.
Implementations
impl<C: StateEventContent> SyncStateEvent<C>
[src]
impl<C: StateEventContent> SyncStateEvent<C>
[src]pub fn into_full_event(self, room_id: RoomId) -> StateEvent<C>
[src]
pub fn into_full_event(self, room_id: RoomId) -> StateEvent<C>
[src]Convert this sync event into a full event, one with a room_id field.
impl SyncStateEvent<MemberEventContent>
[src]
impl SyncStateEvent<MemberEventContent>
[src]pub fn membership_change(&self) -> MembershipChange
[src]
pub fn membership_change(&self) -> MembershipChange
[src]Helper function for membership change. Check the specification for details.
Trait Implementations
impl<C: Clone + StateEventContent> Clone for SyncStateEvent<C>
[src]
impl<C: Clone + StateEventContent> Clone for SyncStateEvent<C>
[src]fn clone(&self) -> SyncStateEvent<C>
[src]
fn clone(&self) -> SyncStateEvent<C>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<C: Debug + StateEventContent> Debug for SyncStateEvent<C>
[src]
impl<C: Debug + StateEventContent> Debug for SyncStateEvent<C>
[src]impl<'de, C: StateEventContent> Deserialize<'de> for SyncStateEvent<C>
[src]
impl<'de, C: StateEventContent> Deserialize<'de> for SyncStateEvent<C>
[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl<C: StateEventContent> From<StateEvent<C>> for SyncStateEvent<C>
[src]
impl<C: StateEventContent> From<StateEvent<C>> for SyncStateEvent<C>
[src]fn from(event: StateEvent<C>) -> Self
[src]
fn from(event: StateEvent<C>) -> Self
[src]Performs the conversion.
impl<C: StateEventContent> Ord for SyncStateEvent<C>
[src]
impl<C: StateEventContent> Ord for SyncStateEvent<C>
[src]fn cmp(&self, other: &Self) -> Ordering
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]This compares EventId
s and orders them lexicographically.
impl<C: StateEventContent> PartialEq<SyncStateEvent<C>> for SyncStateEvent<C>
[src]
impl<C: StateEventContent> PartialEq<SyncStateEvent<C>> for SyncStateEvent<C>
[src]impl<C: StateEventContent> PartialOrd<SyncStateEvent<C>> for SyncStateEvent<C>
[src]
impl<C: StateEventContent> PartialOrd<SyncStateEvent<C>> for SyncStateEvent<C>
[src]fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]This compares EventId
s and orders them lexicographically.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<C: StateEventContent> Serialize for SyncStateEvent<C>
[src]
impl<C: StateEventContent> Serialize for SyncStateEvent<C>
[src]impl<C: StateEventContent> Eq for SyncStateEvent<C>
[src]
Auto Trait Implementations
impl<C> RefUnwindSafe for SyncStateEvent<C> where
C: RefUnwindSafe,
C: RefUnwindSafe,
impl<C> Send for SyncStateEvent<C> where
C: Send,
C: Send,
impl<C> Sync for SyncStateEvent<C> where
C: Sync,
C: Sync,
impl<C> Unpin for SyncStateEvent<C> where
C: Unpin,
C: Unpin,
impl<C> UnwindSafe for SyncStateEvent<C> where
C: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,