pub struct DeploymentStanding {
pub deployment: String,
pub observation: Observation,
pub now: Judgement,
}Expand description
One deployment’s newest record and what it proves about the commit asked. Both are
carried: the recorded judgement is what was seen, now is what it still proves.
use majordomus_cli::capability::builtin::served::DeploymentStanding;
use majordomus_cli::served::ServedVerdict;
let json = r#"{"deployment":"pages","observation":{"schema":"majordomus.served-observation/v1",
"deployment":"pages","url":"https://majordomus.dev/build.json",
"expected":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","verdict":"served",
"reason":"the deployment serves aaaaaaaaaaaa","at":"1970-01-01T00:00:00Z"},
"now":{"verdict":"stale","reason":"it does not contain bbbbbbbbbbbb"}}"#;
let s: DeploymentStanding = serde_json::from_str(json).unwrap();
// seen as served, and no longer proving the commit asked about
assert_eq!(s.observation.judgement.verdict, ServedVerdict::Served);
assert_eq!(s.now.verdict, ServedVerdict::Stale);Fields§
§deployment: StringThe deployment name.
observation: ObservationThe newest record of it.
now: JudgementThat record re-judged against the commit asked about. This, not the recorded judgement, is what a reader acts on.
Trait Implementations§
Source§impl Clone for DeploymentStanding
impl Clone for DeploymentStanding
Source§fn clone(&self) -> DeploymentStanding
fn clone(&self) -> DeploymentStanding
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 DeploymentStanding
impl Debug for DeploymentStanding
Source§impl<'de> Deserialize<'de> for DeploymentStanding
impl<'de> Deserialize<'de> for DeploymentStanding
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 JsonSchema for DeploymentStanding
impl JsonSchema for DeploymentStanding
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 moreAuto Trait Implementations§
impl Freeze for DeploymentStanding
impl RefUnwindSafe for DeploymentStanding
impl Send for DeploymentStanding
impl Sync for DeploymentStanding
impl Unpin for DeploymentStanding
impl UnsafeUnpin for DeploymentStanding
impl UnwindSafe for DeploymentStanding
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