pub struct IntentPreflight {
pub verdict: IntentPreflightVerdict,
pub issues: Vec<IntentPreflightIssue>,
pub matches: Vec<IntentPreflightMatch>,
pub intents: Vec<IntentPreflightIntent>,
pub governance: Vec<String>,
pub refusals: Vec<IntentPreflightRefusal>,
pub refusal: Option<String>,
}Expand description
Which intent a piece of work serves, whether it is maintenance, or why it may not proceed: the issues it resolved to with a verdict each, every intent reached with its link, what those intents require of the worker, and every refusal with its cause.
use majordomus_cli::intent::{
IntentPreflight, IntentPreflightCause, IntentPreflightRefusal, IntentPreflightVerdict,
};
let refused = IntentPreflight {
verdict: IntentPreflightVerdict::Refused,
issues: vec![],
matches: vec![],
intents: vec![],
governance: vec![],
refusals: vec![IntentPreflightRefusal::new(
None,
IntentPreflightCause::NoIssueCoversPaths,
"no open issue's scope covers README.md".into(),
)],
refusal: Some("no open issue's scope covers README.md".into()),
};
assert_eq!(refused.verdict, IntentPreflightVerdict::Refused);
assert_eq!(refused.refusals[0].cause, IntentPreflightCause::NoIssueCoversPaths);Fields§
§verdict: IntentPreflightVerdictserves, maintenance or refused: refused when any issue is, else serves when any
issue serves an intent, else maintenance.
issues: Vec<IntentPreflightIssue>The issues the work was resolved to — the one named, or the open issues whose scope covers a path — each with its own verdict.
matches: Vec<IntentPreflightMatch>Every intent an issue serves, with the link.
intents: Vec<IntentPreflightIntent>The intents the work serves, and no other, each with what it asks of the worker.
governance: Vec<String>The governance of those intents, each entry once, in first-seen order.
refusals: Vec<IntentPreflightRefusal>Every reason the preflight refused, in issue order; empty unless the verdict is
refused.
refusal: Option<String>When refused: every refusal’s sentence, joined, for a reader who wants one line.
Trait Implementations§
Source§impl Clone for IntentPreflight
impl Clone for IntentPreflight
Source§fn clone(&self) -> IntentPreflight
fn clone(&self) -> IntentPreflight
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IntentPreflight
impl Debug for IntentPreflight
Source§impl<'de> Deserialize<'de> for IntentPreflight
impl<'de> Deserialize<'de> for IntentPreflight
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>,
impl Eq for IntentPreflight
Source§impl JsonSchema for IntentPreflight
impl JsonSchema for IntentPreflight
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for IntentPreflight
impl PartialEq for IntentPreflight
Source§fn eq(&self, other: &IntentPreflight) -> bool
fn eq(&self, other: &IntentPreflight) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for IntentPreflight
impl Serialize for IntentPreflight
impl StructuralPartialEq for IntentPreflight
Auto Trait Implementations§
impl Freeze for IntentPreflight
impl RefUnwindSafe for IntentPreflight
impl Send for IntentPreflight
impl Sync for IntentPreflight
impl Unpin for IntentPreflight
impl UnsafeUnpin for IntentPreflight
impl UnwindSafe for IntentPreflight
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
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
key and return true if they are equal.