#[non_exhaustive]pub enum RelationWithoutReplacement {
Reply {
in_reply_to: InReplyTo,
},
Thread(Thread),
}
Expand description
Message event relationship, except a replacement.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Reply
An m.in_reply_to
relation indicating that the event is a reply to another event.
Thread(Thread)
An event that belongs to a thread.
Implementations§
§impl RelationWithoutReplacement
impl RelationWithoutReplacement
pub fn rel_type(&self) -> Option<RelationType>
pub fn rel_type(&self) -> Option<RelationType>
The type of this Relation
.
Returns an Option
because the Reply
relation does not have arel_type
field.
Trait Implementations§
§impl Clone for RelationWithoutReplacement
impl Clone for RelationWithoutReplacement
§fn clone(&self) -> RelationWithoutReplacement
fn clone(&self) -> RelationWithoutReplacement
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for RelationWithoutReplacement
impl Debug for RelationWithoutReplacement
§impl Serialize for RelationWithoutReplacement
impl Serialize for RelationWithoutReplacement
§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,
Serialize this value into the given Serde serializer. Read more
§impl<C> TryFrom<Relation<C>> for RelationWithoutReplacement
impl<C> TryFrom<Relation<C>> for RelationWithoutReplacement
§type Error = Replacement<C>
type Error = Replacement<C>
The type returned in the event of a conversion error.
§fn try_from(
value: Relation<C>
) -> Result<RelationWithoutReplacement, <RelationWithoutReplacement as TryFrom<Relation<C>>>::Error>
fn try_from( value: Relation<C> ) -> Result<RelationWithoutReplacement, <RelationWithoutReplacement as TryFrom<Relation<C>>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl RefUnwindSafe for RelationWithoutReplacement
impl Send for RelationWithoutReplacement
impl Sync for RelationWithoutReplacement
impl Unpin for RelationWithoutReplacement
impl UnwindSafe for RelationWithoutReplacement
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
Mutably borrows from an owned value. Read more