pub struct TaskSchema {
pub code: String,
pub type: TaskType,
pub total: i32,
pub rewards: Box<RewardsSchema>,
}Fields§
§code: StringTask objective.
type: TaskTypeThe type of task.
total: i32The total required to complete the task.
rewards: Box<RewardsSchema>Rewards for completing the task.
Implementations§
Source§impl TaskSchema
impl TaskSchema
pub fn new( code: String, type: TaskType, total: i32, rewards: RewardsSchema, ) -> TaskSchema
Trait Implementations§
Source§impl Clone for TaskSchema
impl Clone for TaskSchema
Source§fn clone(&self) -> TaskSchema
fn clone(&self) -> TaskSchema
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 TaskSchema
impl Debug for TaskSchema
Source§impl Default for TaskSchema
impl Default for TaskSchema
Source§fn default() -> TaskSchema
fn default() -> TaskSchema
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TaskSchema
impl<'de> Deserialize<'de> for TaskSchema
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
Source§impl PartialEq for TaskSchema
impl PartialEq for TaskSchema
Source§impl Serialize for TaskSchema
impl Serialize for TaskSchema
impl StructuralPartialEq for TaskSchema
Auto Trait Implementations§
impl Freeze for TaskSchema
impl RefUnwindSafe for TaskSchema
impl Send for TaskSchema
impl Sync for TaskSchema
impl Unpin for TaskSchema
impl UnwindSafe for TaskSchema
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