Skip to main content

ReadReceiptAdded

Struct ReadReceiptAdded 

Source
pub struct ReadReceiptAdded {
    pub room_id: OwnedRoomId,
    pub user_id: OwnedUserId,
    pub event_id: OwnedEventId,
    pub receipt_type: ReceiptType,
    pub thread: ReceiptThread,
    pub ts: MilliSecondsSinceUnixEpoch,
    pub provenance: EventProvenance,
    pub member_servers: Vec<OwnedServerName>,
}
Expand description

A user’s read receipt was recorded in a room.

Fields§

§room_id: OwnedRoomId

The room the receipt was recorded in.

§user_id: OwnedUserId

The user the receipt belongs to.

§event_id: OwnedEventId

The event acknowledged “up to”.

§receipt_type: ReceiptType

Whether the receipt is public or private. Only public receipts are federated.

§thread: ReceiptThread

The thread the receipt applies to.

[ReceiptThread::Unthreaded] has no string form and serialises as null, which its own Deserialize rejects. The unthreaded case therefore has to travel as the field’s absence, which is the same shape ruma gives Receipt::thread.

§ts: MilliSecondsSinceUnixEpoch

When the receipt was made.

§provenance: EventProvenance

Where the receipt came from.

§member_servers: Vec<OwnedServerName>

The homeservers with a member in the room, including our own.

Trait Implementations§

Source§

impl Clone for ReadReceiptAdded

Source§

fn clone(&self) -> ReadReceiptAdded

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ReadReceiptAdded

Source§

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

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

impl Deduplicate for ReadReceiptAdded

Source§

fn dedup_key(&self) -> DedupKey

A receipt has no unique ID of its own. Two receipts agreeing on all of these describe the same receipt state.

Source§

impl<'de> Deserialize<'de> for ReadReceiptAdded

Source§

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 Event for ReadReceiptAdded

Source§

const SUBJECT: &'static str = "room-service.events.read_receipt_added.v1"

The NATS subject pattern this event type lives under. Read more
Source§

const COMPATIBLE_SUBJECTS: &'static [&'static str]

Subjects of older compatible versions of this event type. Read more
Source§

fn subject(&self) -> Cow<'static, str>

The concrete subject this instance is published to. Read more
Source§

fn into_payload(self) -> Result<Vec<u8>, Error>

Serialize this event into the transport payload. Read more
Source§

fn from_payload(subject: &str, payload: &[u8]) -> Result<Self, Error>

Deserialize a raw payload into Self, using subject to select the right schema when compatible older versions are present. Read more
Source§

impl Serialize for ReadReceiptAdded

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

§

impl<T> DropFlavorWrapper<T> for T

§

type Flavor = MayDrop

The DropFlavor that [wrap]s T into Self
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

§

const WITNESS: W = W::MAKE

A constant of the type witness
§

impl<T> Identity for T
where T: ?Sized,

§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
§

impl<T> Instrument for T

§

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

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

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 T
where U: From<T>,

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.

§

impl<T> JsonCastable<CanonicalJsonValue> for T

§

impl<T> JsonCastable<Value> for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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