pub struct Baseline {
pub version: String,
pub reference: String,
pub read_at: String,
pub commit: String,
pub recorded: bool,
pub atoms: usize,
pub fingerprint: String,
}Expand description
The release this tree is measured against, and how it was found.
use majordomus_cli::release::compat::Baseline;
let baseline = Baseline {
version: "0.5.0".into(),
reference: "v0.5.0".into(),
read_at: "3a032c1e033b".into(),
commit: "3a032c1e033b".into(),
recorded: true,
atoms: 300,
fingerprint: "sha256:…".into(),
};
// `recorded` is the half that matters: a baseline taken from a tag alone is reported.
assert!(baseline.recorded);
assert_eq!(baseline.reference, "v0.5.0");Fields§
§version: String0.5.0.
reference: Stringv0.5.0: the release, as a reader recognises it.
read_at: StringThe ref the surface was actually read from — the commit the release record names, which a clone always has, rather than a tag it may not.
commit: StringThe commit that ref resolved to.
recorded: boolWhether the layer holds a release record for it, which is what makes it canonical rather than the newest thing that looked like a tag.
atoms: usizeHow many public atoms it published.
fingerprint: StringThe fingerprint of the surface it published.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Baseline
impl<'de> Deserialize<'de> for Baseline
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 Baseline
Source§impl JsonSchema for Baseline
impl JsonSchema for Baseline
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 moreimpl StructuralPartialEq for Baseline
Auto Trait Implementations§
impl Freeze for Baseline
impl RefUnwindSafe for Baseline
impl Send for Baseline
impl Sync for Baseline
impl Unpin for Baseline
impl UnsafeUnpin for Baseline
impl UnwindSafe for Baseline
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<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.