pub struct RankCard {
pub template: RankCardTemplate,
pub username: String,
pub discriminator: String,
pub avatar_url: String,
pub level: u64,
pub current_xp: u64,
pub needed_xp: u64,
pub background_url: String,
pub background_color: String,
pub text_color: String,
pub current_xp_color: String,
pub xp_bar_color: String,
}
Fields§
§template: RankCardTemplate
§username: String
§discriminator: String
§avatar_url: String
§level: u64
§current_xp: u64
§needed_xp: u64
§background_url: String
§background_color: String
§text_color: String
§current_xp_color: String
§xp_bar_color: String
Implementations§
Source§impl RankCard
impl RankCard
Sourcepub fn new<T: ToString, U: ToString, V: ToString>(
username: T,
discriminator: U,
avatar_url: V,
level: u64,
(current_xp, needed_xp): (u64, u64),
) -> Self
pub fn new<T: ToString, U: ToString, V: ToString>( username: T, discriminator: U, avatar_url: V, level: u64, (current_xp, needed_xp): (u64, u64), ) -> Self
Sourcepub fn set_template(self, template: RankCardTemplate) -> Self
pub fn set_template(self, template: RankCardTemplate) -> Self
Sets the rank card template
Sourcepub fn set_background_url<T: ToString>(self, background_url: T) -> Self
pub fn set_background_url<T: ToString>(self, background_url: T) -> Self
Sets the rank card background URL
Sourcepub fn set_background_color<T: TryInto<Hex>>(
self,
hex: T,
) -> Result<Self, T::Error>
pub fn set_background_color<T: TryInto<Hex>>( self, hex: T, ) -> Result<Self, T::Error>
Sets the rank card background color
Sourcepub fn set_text_color<T: TryInto<Hex>>(self, hex: T) -> Result<Self, T::Error>
pub fn set_text_color<T: TryInto<Hex>>(self, hex: T) -> Result<Self, T::Error>
Sets the rank card text color
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RankCard
impl RefUnwindSafe for RankCard
impl Send for RankCard
impl Sync for RankCard
impl Unpin for RankCard
impl UnwindSafe for RankCard
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