Enum matrix_sdk_base::ruma::events::receipt::ReceiptThread
#[non_exhaustive]pub enum ReceiptThread {
Unthreaded,
Main,
Thread(OwnedEventId),
}
Expand description
The thread a receipt applies to.
This type can hold an arbitrary string. To build this with a custom value, convert it from an
Option<String>
with ::from()
/ .into()
. ReceiptThread::Unthreaded
can be constructed
from None
.
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
Unthreaded
The receipt applies to the timeline, regardless of threads.
Used by clients that are not aware of threads.
This is the default.
Main
The receipt applies to the main timeline.
Used for events that don’t belong to a thread.
Thread(OwnedEventId)
The receipt applies to a thread.
Used for events that belong to a thread with the given thread root.
Implementations§
§impl ReceiptThread
impl ReceiptThread
pub fn as_str(&self) -> Option<&str>
pub fn as_str(&self) -> Option<&str>
Get the string representation of this ReceiptThread
.
ReceiptThread::Unthreaded
returns None
.
Trait Implementations§
§impl Clone for ReceiptThread
impl Clone for ReceiptThread
§fn clone(&self) -> ReceiptThread
fn clone(&self) -> ReceiptThread
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for ReceiptThread
impl Debug for ReceiptThread
§impl Default for ReceiptThread
impl Default for ReceiptThread
§fn default() -> ReceiptThread
fn default() -> ReceiptThread
§impl<'de> Deserialize<'de> for ReceiptThread
impl<'de> Deserialize<'de> for ReceiptThread
§fn deserialize<D>(
deserializer: D
) -> Result<ReceiptThread, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<ReceiptThread, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl Hash for ReceiptThread
impl Hash for ReceiptThread
§impl PartialEq for ReceiptThread
impl PartialEq for ReceiptThread
§fn eq(&self, other: &ReceiptThread) -> bool
fn eq(&self, other: &ReceiptThread) -> bool
self
and other
values to be equal, and is used
by ==
.§impl Serialize for ReceiptThread
impl Serialize for ReceiptThread
§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,
§impl<T> TryFrom<Option<T>> for ReceiptThread
impl<T> TryFrom<Option<T>> for ReceiptThread
impl Eq for ReceiptThread
impl StructuralEq for ReceiptThread
impl StructuralPartialEq for ReceiptThread
Auto Trait Implementations§
impl RefUnwindSafe for ReceiptThread
impl Send for ReceiptThread
impl Sync for ReceiptThread
impl Unpin for ReceiptThread
impl UnwindSafe for ReceiptThread
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.