#[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<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>,
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§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,
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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
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.Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more