pub struct ForgeObserved {
pub observed: bool,
pub reason: Option<String>,
pub repository: Option<String>,
pub observed_at: Option<String>,
pub deployments: usize,
pub releases: usize,
pub environments: usize,
pub exit_code: i32,
}Expand description
What served.forge came to: whether the forge answered, and what its answer held. The
answer itself is read through deploy.observed; this is the receipt of having asked.
use majordomus_cli::capability::builtin::served::ForgeObserved;
// a forge that could not be asked is said, with the reason, and is exit 12: not answered
let json = r#"{"observed":false,"reason":"gh repo view failed: no network",
"deployments":0,"releases":0,"environments":0,"exit_code":12}"#;
let got: ForgeObserved = serde_json::from_str(json).unwrap();
assert!(!got.observed);
assert_eq!(got.exit_code, 12);
assert!(got.repository.is_none());Fields§
§observed: boolWhether the forge answered and the answer was recorded.
reason: Option<String>Why not, in the words of whatever refused; absent when it answered.
repository: Option<String>owner/name, as the forge named the repository.
observed_at: Option<String>When the forge was asked, RFC 3339.
deployments: usizeHow many deployments the answer held.
releases: usizeHow many releases the answer held.
environments: usizeHow many environments those deployments went to.
exit_code: i32The exit status the command line reports: 0 observed, 12 not answered.
Trait Implementations§
Source§impl Clone for ForgeObserved
impl Clone for ForgeObserved
Source§fn clone(&self) -> ForgeObserved
fn clone(&self) -> ForgeObserved
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 ForgeObserved
impl Debug for ForgeObserved
Source§impl<'de> Deserialize<'de> for ForgeObserved
impl<'de> Deserialize<'de> for ForgeObserved
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 ForgeObserved
Source§impl JsonSchema for ForgeObserved
impl JsonSchema for ForgeObserved
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 PartialEq for ForgeObserved
impl PartialEq for ForgeObserved
Source§fn eq(&self, other: &ForgeObserved) -> bool
fn eq(&self, other: &ForgeObserved) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ForgeObserved
impl Serialize for ForgeObserved
impl StructuralPartialEq for ForgeObserved
Auto Trait Implementations§
impl Freeze for ForgeObserved
impl RefUnwindSafe for ForgeObserved
impl Send for ForgeObserved
impl Sync for ForgeObserved
impl Unpin for ForgeObserved
impl UnsafeUnpin for ForgeObserved
impl UnwindSafe for ForgeObserved
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.