pub struct Activity<'a> { /* private fields */ }
Expand description
A struct representing a Discord rich presence activity
Note that all methods return Self
, and can be chained
for fluency
Implementations§
§impl<'a> Activity<'a>
impl<'a> Activity<'a>
pub fn timestamps(self, timestamps: Timestamps) -> Activity<'a>
pub fn timestamps(self, timestamps: Timestamps) -> Activity<'a>
Add a Timestamps
to this activity
Add a Vec
of Button
s to this activity
An activity may contain no more than 2 buttons
Trait Implementations§
§impl<'a> Ord for Activity<'a>
impl<'a> Ord for Activity<'a>
§impl<'a> PartialEq<Activity<'a>> for Activity<'a>
impl<'a> PartialEq<Activity<'a>> for Activity<'a>
§impl<'a> PartialOrd<Activity<'a>> for Activity<'a>
impl<'a> PartialOrd<Activity<'a>> for Activity<'a>
§fn partial_cmp(&self, other: &Activity<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &Activity<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl<'a> Serialize for Activity<'a>
impl<'a> Serialize for Activity<'a>
§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<'a> Eq for Activity<'a>
impl<'a> StructuralEq for Activity<'a>
impl<'a> StructuralPartialEq for Activity<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Activity<'a>
impl<'a> Send for Activity<'a>
impl<'a> Sync for Activity<'a>
impl<'a> Unpin for Activity<'a>
impl<'a> UnwindSafe for Activity<'a>
Blanket Implementations§
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.