#[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§
Source§impl ReceiptThread
impl ReceiptThread
Sourcepub 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§
Source§impl Clone for ReceiptThread
impl Clone for ReceiptThread
Source§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 moreSource§impl Debug for ReceiptThread
impl Debug for ReceiptThread
Source§impl Default for ReceiptThread
impl Default for ReceiptThread
Source§fn default() -> ReceiptThread
fn default() -> ReceiptThread
Source§impl<'de> Deserialize<'de> for ReceiptThread
impl<'de> Deserialize<'de> for ReceiptThread
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Hash for ReceiptThread
impl Hash for ReceiptThread
Source§impl PartialEq for ReceiptThread
impl PartialEq for ReceiptThread
Source§impl Serialize for ReceiptThread
impl Serialize for ReceiptThread
Source§impl<T> TryFrom<Option<T>> for ReceiptThread
impl<T> TryFrom<Option<T>> for ReceiptThread
impl Eq for ReceiptThread
impl StructuralPartialEq for ReceiptThread
Auto Trait Implementations§
impl Freeze for ReceiptThread
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.