#[non_exhaustive]
pub enum ReceiptType {
Read,
ReadPrivate,
// some variants omitted
}
events
only.Expand description
The type of receipt.
This type can hold an arbitrary string. To build this with a custom value, convert it from a
string with ::from()
/ .into()
. To check for values that are not available as a
documented variant here, use its string representation, obtained through
.as_str()
.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Read
Indicates that the given event has been presented to the user. It is also the point from where the unread notifications count is computed.
This receipt is federated to other users.
If both Read
and ReadPrivate
are present, the one that references
the most recent event is used to get the latest read receipt.
ReadPrivate
unstable-msc2285
only.Indicates that the given event has been presented to the user. It is also the point from where the unread notifications count is computed.
This read receipt is not federated so only the user and their homeserver are aware of it.
If both Read
and ReadPrivate
are present, the one that references
the most recent event is used to get the latest read receipt.
Implementations
sourceimpl ReceiptType
impl ReceiptType
Trait Implementations
sourceimpl AsRef<str> for ReceiptType
impl AsRef<str> for ReceiptType
sourceimpl Clone for ReceiptType
impl Clone for ReceiptType
sourcefn clone(&self) -> ReceiptType
fn clone(&self) -> ReceiptType
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for ReceiptType
impl Debug for ReceiptType
sourceimpl<'de> Deserialize<'de> for ReceiptType
impl<'de> Deserialize<'de> for ReceiptType
sourcefn deserialize<D>(
deserializer: D
) -> Result<ReceiptType, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<ReceiptType, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
sourceimpl Display for ReceiptType
impl Display for ReceiptType
sourceimpl<T> From<T> for ReceiptTypewhere
T: AsRef<str> + Into<Box<str, Global>>,
impl<T> From<T> for ReceiptTypewhere
T: AsRef<str> + Into<Box<str, Global>>,
sourcefn from(s: T) -> ReceiptType
fn from(s: T) -> ReceiptType
sourceimpl Ord for ReceiptType
impl Ord for ReceiptType
sourcefn cmp(&self, other: &ReceiptType) -> Ordering
fn cmp(&self, other: &ReceiptType) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl PartialEq<ReceiptType> for ReceiptType
impl PartialEq<ReceiptType> for ReceiptType
sourcefn eq(&self, other: &ReceiptType) -> bool
fn eq(&self, other: &ReceiptType) -> bool
sourceimpl PartialOrd<ReceiptType> for ReceiptType
impl PartialOrd<ReceiptType> for ReceiptType
sourcefn partial_cmp(&self, other: &ReceiptType) -> Option<Ordering>
fn partial_cmp(&self, other: &ReceiptType) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl Serialize for ReceiptType
impl Serialize for ReceiptType
sourcefn 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,
impl Eq for ReceiptType
impl StructuralEq for ReceiptType
Auto Trait Implementations
impl RefUnwindSafe for ReceiptType
impl Send for ReceiptType
impl Sync for ReceiptType
impl Unpin for ReceiptType
impl UnwindSafe for ReceiptType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.