Struct CriterionProgress
#[non_exhaustive]pub struct CriterionProgress {
pub name: String,
pub obtained_at: Option<String>,
}Expand description
One criterion in an advancement, including criteria not yet obtained.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe criterion’s name within the advancement.
obtained_at: Option<String>The stored grant date, or None when this criterion is not obtained.
Dates use the advancement save format (yyyy-MM-dd HH:mm:ss Z);
capturing progress preserves the original date rather than reading a clock.
Implementations§
§impl CriterionProgress
impl CriterionProgress
pub fn new(name: String, obtained_at: Option<String>) -> CriterionProgress
pub fn new(name: String, obtained_at: Option<String>) -> CriterionProgress
Build a criterion snapshot from its name and existing grant date.
Trait Implementations§
§impl Clone for CriterionProgress
impl Clone for CriterionProgress
§fn clone(&self) -> CriterionProgress
fn clone(&self) -> CriterionProgress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for CriterionProgress
impl Debug for CriterionProgress
impl Eq for CriterionProgress
§impl PartialEq for CriterionProgress
impl PartialEq for CriterionProgress
impl StructuralPartialEq for CriterionProgress
Auto Trait Implementations§
impl Freeze for CriterionProgress
impl RefUnwindSafe for CriterionProgress
impl Send for CriterionProgress
impl Sync for CriterionProgress
impl Unpin for CriterionProgress
impl UnsafeUnpin for CriterionProgress
impl UnwindSafe for CriterionProgress
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