Struct ruma::events::StateUnsigned

source ·
pub struct StateUnsigned<C>where
    C: PossiblyRedactedStateEventContent,
{ pub age: Option<Int>, pub transaction_id: Option<OwnedTransactionId>, pub prev_content: Option<C>, pub relations: BundledRelations, }
Available on crate feature events only.
Expand description

Extra information about a state event that is not incorporated into the event’s hash.

Fields§

§age: Option<Int>

The time in milliseconds that has elapsed since the event was sent.

This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is.

§transaction_id: Option<OwnedTransactionId>

The client-supplied transaction ID, if the client being given the event is the same one which sent it.

§prev_content: Option<C>

Optional previous content of the event.

§relations: BundledRelations

Bundled aggregations of related child events.

Implementations§

source§

impl<C> StateUnsigned<C>where
    C: PossiblyRedactedStateEventContent,

source

pub fn new() -> StateUnsigned<C>

Create a new Unsigned with fields set to None.

Trait Implementations§

source§

impl<C> CanBeEmpty for StateUnsigned<C>where
    C: PossiblyRedactedStateEventContent,

source§

fn is_empty(&self) -> bool

Whether this unsigned data is empty (all fields are None).

This method is used to determine whether to skip serializing the unsigned field in room events. Do not use it to determine whether an incoming unsigned field was present - it could still have been present but contained none of the known fields.

source§

impl<C> Clone for StateUnsigned<C>where
    C: Clone + PossiblyRedactedStateEventContent,

source§

fn clone(&self) -> StateUnsigned<C>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<C> Debug for StateUnsigned<C>where
    C: Debug + PossiblyRedactedStateEventContent,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<C> Default for StateUnsigned<C>where
    C: PossiblyRedactedStateEventContent,

source§

fn default() -> StateUnsigned<C>

Returns the “default value” for a type. Read more
source§

impl<'de, C> Deserialize<'de> for StateUnsigned<C>where
    C: PossiblyRedactedStateEventContent + Deserialize<'de>,

source§

fn deserialize<__D>(
    __deserializer: __D
) -> Result<StateUnsigned<C>, <__D as Deserializer<'de>>::Error>where
    __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl<C> RefUnwindSafe for StateUnsigned<C>where
    C: RefUnwindSafe,

§

impl<C> Send for StateUnsigned<C>where
    C: Send,

§

impl<C> Sync for StateUnsigned<C>where
    C: Sync,

§

impl<C> Unpin for StateUnsigned<C>where
    C: Unpin,

§

impl<C> UnwindSafe for StateUnsigned<C>where
    C: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere
    T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere
    V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
    S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
    S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere
    T: for<'de> Deserialize<'de>,