pub struct DailyTasks {
pub tasks: Vec<Task>,
pub rewards: [RewardChest; 3],
}
Expand description
Information about the tasks, that reset every day
Fields§
§tasks: Vec<Task>
The tasks you have to do
rewards: [RewardChest; 3]
The rewards available for completing tasks.
Implementations§
Source§impl DailyTasks
impl DailyTasks
Sourcepub fn earned_points(&self) -> u32
pub fn earned_points(&self) -> u32
The amount of points you have collected from completing tasks
Sourcepub fn total_points(&self) -> u32
pub fn total_points(&self) -> u32
The amount of points, that are available in total
Sourcepub fn get_available(&self, task_type: TaskType) -> Option<&Task>
pub fn get_available(&self, task_type: TaskType) -> Option<&Task>
Checks if a task of the given type is available and not completed
Sourcepub fn get_uncompleted(&self) -> Vec<&Task>
pub fn get_uncompleted(&self) -> Vec<&Task>
Returns all uncompleted tasks
Sourcepub fn can_open_chest(&self, index: usize) -> bool
pub fn can_open_chest(&self, index: usize) -> bool
Checks if the chest at the given index can be opened
Trait Implementations§
Source§impl Clone for DailyTasks
impl Clone for DailyTasks
Source§fn clone(&self) -> DailyTasks
fn clone(&self) -> DailyTasks
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 DailyTasks
impl Debug for DailyTasks
Source§impl Default for DailyTasks
impl Default for DailyTasks
Source§fn default() -> DailyTasks
fn default() -> DailyTasks
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DailyTasks
impl<'de> Deserialize<'de> for DailyTasks
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 DailyTasks
impl RefUnwindSafe for DailyTasks
impl Send for DailyTasks
impl Sync for DailyTasks
impl Unpin for DailyTasks
impl UnwindSafe for DailyTasks
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