pub struct AccountAchievement {
pub id: u64,
pub bits: Option<Vec<u64>>,
pub current: Option<u64>,
pub max: Option<u64>,
pub done: bool,
pub repeated: Option<u64>,
pub unlocked: Option<bool>,
}
Expand description
An achievement unlocked by an account.
Fields§
§id: u64
The id of the achievement.
bits: Option<Vec<u64>>
§current: Option<u64>
The current progress towards the achievement.
max: Option<u64>
The amount if objectives required to complete the achievement.
done: bool
Whether the achievement has been completed.
repeated: Option<u64>
The number of times this achievement has been completed. Only avaliable for repeatable achievements.
unlocked: Option<bool>
Whether the achievement has been unlocked (not completed).
Note that a None
value also indicates that the achievment is unlocked.
Implementations§
Source§impl AccountAchievement
impl AccountAchievement
Sourcepub fn is_unlocked(&self) -> bool
pub fn is_unlocked(&self) -> bool
Returns true
if this achievement is unlocked.
Trait Implementations§
Source§impl Clone for AccountAchievement
impl Clone for AccountAchievement
Source§fn clone(&self) -> AccountAchievement
fn clone(&self) -> AccountAchievement
Returns a duplicate 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 AccountAchievement
impl Debug for AccountAchievement
Source§impl<'de> Deserialize<'de> for AccountAchievement
impl<'de> Deserialize<'de> for AccountAchievement
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
Auto Trait Implementations§
impl Freeze for AccountAchievement
impl RefUnwindSafe for AccountAchievement
impl Send for AccountAchievement
impl Sync for AccountAchievement
impl Unpin for AccountAchievement
impl UnwindSafe for AccountAchievement
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