pub struct Verification {
pub by: Option<Actor>,
pub at: Option<DateTimeField>,
}Expand description
A single verification event: { by, at }.
Multiple entries capture independent checks, a human sign-off plus a
nightly process, say. “How recently” is the latest Verification::at.
Fields§
§by: Option<Actor>The verifying actor.
at: Option<DateTimeField>When the verification happened.
Implementations§
Source§impl Verification
impl Verification
Sourcepub fn from_value(value: &Value) -> Option<Self>
pub fn from_value(value: &Value) -> Option<Self>
Reads one { by, at } mapping. Returns None when the value is not a
mapping.
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
true when this event has the required actor and a parseable timestamp
that includes a time of day and an explicit UTC offset.
Sourcepub fn list_from_value(value: &Value) -> Vec<Self>
pub fn list_from_value(value: &Value) -> Vec<Self>
Reads a whole verified value into a list of events.
Consumers MUST treat a bare { by, at } mapping as a one-element
list, so that shape is
accepted here alongside the list form. Any other shape yields an empty
list.
Trait Implementations§
Source§impl Clone for Verification
impl Clone for Verification
Source§fn clone(&self) -> Verification
fn clone(&self) -> Verification
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 moreSource§impl Debug for Verification
impl Debug for Verification
Source§impl Display for Verification
impl Display for Verification
impl Eq for Verification
Source§impl PartialEq for Verification
impl PartialEq for Verification
impl StructuralPartialEq for Verification
Auto Trait Implementations§
impl Freeze for Verification
impl RefUnwindSafe for Verification
impl Send for Verification
impl Sync for Verification
impl Unpin for Verification
impl UnsafeUnpin for Verification
impl UnwindSafe for Verification
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