pub struct Clan { /* private fields */ }
Expand description
Data of a single Clan
Implementations§
Source§impl Clan
Auto-generated by derive_getters::Getters
.
impl Clan
Auto-generated by derive_getters::Getters
.
Sourcepub fn name(&self) -> &String
pub fn name(&self) -> &String
Name of this clan.
Examples found in repository?
examples/top_leaderboard.rs (line 22)
15fn print_clan(leaderboard: &[Clan]) {
16 let c = leaderboard
17 .first()
18 .expect("Leaderboard is empty");
19
20 println!(
21 "Top clan: {} [{}] ({} XP)",
22 c.name(),
23 c.tag(),
24 c.xp()
25 )
26}
Sourcepub fn tag(&self) -> &String
pub fn tag(&self) -> &String
Tag of this clan.
Examples found in repository?
examples/top_leaderboard.rs (line 23)
15fn print_clan(leaderboard: &[Clan]) {
16 let c = leaderboard
17 .first()
18 .expect("Leaderboard is empty");
19
20 println!(
21 "Top clan: {} [{}] ({} XP)",
22 c.name(),
23 c.tag(),
24 c.xp()
25 )
26}
Sourcepub fn xp(&self) -> &usize
pub fn xp(&self) -> &usize
The total experience of this clan.
Examples found in repository?
examples/top_leaderboard.rs (line 24)
15fn print_clan(leaderboard: &[Clan]) {
16 let c = leaderboard
17 .first()
18 .expect("Leaderboard is empty");
19
20 println!(
21 "Top clan: {} [{}] ({} XP)",
22 c.name(),
23 c.tag(),
24 c.xp()
25 )
26}
Sourcepub fn max_players(&self) -> &usize
pub fn max_players(&self) -> &usize
The maximum amount of players in this clan.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Clan
impl<'de> Deserialize<'de> for Clan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Clan
Auto Trait Implementations§
impl Freeze for Clan
impl RefUnwindSafe for Clan
impl Send for Clan
impl Sync for Clan
impl Unpin for Clan
impl UnwindSafe for Clan
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