Enum discord_flows::model::DefaultAvatar
source · pub enum DefaultAvatar {
Blurple,
Grey,
Green,
Orange,
Red,
}Expand description
An enum that represents a default avatar.
The default avatar is calculated via the result of discriminator % 5.
The has of the avatar can be retrieved via calling Self::name on the enum.
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.
Blurple
The avatar when the result is 0.
Grey
The avatar when the result is 1.
Green
The avatar when the result is 2.
Orange
The avatar when the result is 3.
Red
The avatar when the result is 4.
Implementations§
source§impl DefaultAvatar
impl DefaultAvatar
Trait Implementations§
source§impl Clone for DefaultAvatar
impl Clone for DefaultAvatar
source§fn clone(&self) -> DefaultAvatar
fn clone(&self) -> DefaultAvatar
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 moresource§impl Debug for DefaultAvatar
impl Debug for DefaultAvatar
source§impl<'de> Deserialize<'de> for DefaultAvatar
impl<'de> Deserialize<'de> for DefaultAvatar
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<DefaultAvatar, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<DefaultAvatar, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for DefaultAvatar
impl Hash for DefaultAvatar
source§impl Ord for DefaultAvatar
impl Ord for DefaultAvatar
source§fn cmp(&self, other: &DefaultAvatar) -> Ordering
fn cmp(&self, other: &DefaultAvatar) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<DefaultAvatar> for DefaultAvatar
impl PartialEq<DefaultAvatar> for DefaultAvatar
source§fn eq(&self, other: &DefaultAvatar) -> bool
fn eq(&self, other: &DefaultAvatar) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<DefaultAvatar> for DefaultAvatar
impl PartialOrd<DefaultAvatar> for DefaultAvatar
source§fn partial_cmp(&self, other: &DefaultAvatar) -> Option<Ordering>
fn partial_cmp(&self, other: &DefaultAvatar) -> 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 moresource§impl Serialize for DefaultAvatar
impl Serialize for DefaultAvatar
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,
Serialize this value into the given Serde serializer. Read more
impl Copy for DefaultAvatar
impl Eq for DefaultAvatar
impl StructuralEq for DefaultAvatar
impl StructuralPartialEq for DefaultAvatar
Auto Trait Implementations§
impl RefUnwindSafe for DefaultAvatar
impl Send for DefaultAvatar
impl Sync for DefaultAvatar
impl Unpin for DefaultAvatar
impl UnwindSafe for DefaultAvatar
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