pub enum AgeSource {
Derivation,
Commit,
Date,
}Expand description
Where the age of a candidate in the review queue was read from. A candidate’s date is
the day of the evidence it came from, deliberately, so that the same evidence yields the
same bytes; the day it entered the queue is a different fact and is read from the ledger
first, then from git, and only then from the record.
use majordomus_cli::capability::builtin::knowledge_base::AgeSource;
let from_ledger: AgeSource = serde_json::from_str(r#""derivation""#).unwrap();
assert_eq!(from_ledger, AgeSource::Derivation);
assert!(AgeSource::Derivation < AgeSource::Date, "the ledger is asked before the record");Variants§
Derivation
The oldest knowledge.derived line in this checkout’s ledger whose paths name it.
Commit
The commit that added the file to this history.
Date
The record’s own date, at midnight UTC: the evidence day, not the queue day.
Implementations§
Trait Implementations§
impl Copy for AgeSource
Source§impl<'de> Deserialize<'de> for AgeSource
impl<'de> Deserialize<'de> for AgeSource
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
impl Eq for AgeSource
Source§impl JsonSchema for AgeSource
impl JsonSchema for AgeSource
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for AgeSource
impl Ord for AgeSource
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for AgeSource
impl PartialOrd for AgeSource
impl StructuralPartialEq for AgeSource
Auto Trait Implementations§
impl Freeze for AgeSource
impl RefUnwindSafe for AgeSource
impl Send for AgeSource
impl Sync for AgeSource
impl Unpin for AgeSource
impl UnsafeUnpin for AgeSource
impl UnwindSafe for AgeSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.