pub struct IntentBindingInput {
pub issue: Option<String>,
pub intent: Option<String>,
pub paths: String,
pub exemption: Option<String>,
pub because: Option<String>,
}Expand description
The input of intents.binding: what a worker names when it asks what its work serves.
Flat strings, because the same value arrives as a query string, as MCP arguments and as
the flags of majordomus intent binding.
use majordomus_cli::capability::builtin::intents::IntentBindingInput;
let i = IntentBindingInput { issue: Some("I1900".into()), paths: "lib, docs".into(), ..Default::default() };
let r = i.request();
assert_eq!(r.issue.as_deref(), Some("I1900"));
assert_eq!(r.paths, ["lib", "docs"]);Fields§
§issue: Option<String>The issue the work executes, by id.
intent: Option<String>The intent the work serves, by id, when the worker names it directly.
paths: StringRepository-relative paths the work will touch, separated by commas.
exemption: Option<String>An exemption class the policy declares under intent.exemptions.
because: Option<String>Why the exemption applies.
Implementations§
Source§impl IntentBindingInput
impl IntentBindingInput
Sourcepub fn request(&self) -> BindingRequest
pub fn request(&self) -> BindingRequest
The typed request: the paths split at commas, everything else as given.
use majordomus_cli::capability::builtin::intents::IntentBindingInput;
assert!(IntentBindingInput::default().request().trimmed().names_nothing());Trait Implementations§
Source§impl BenchmarkCases for IntentBindingInput
impl BenchmarkCases for IntentBindingInput
Source§fn benchmark_cases(ctx: &CaseContext<'_>) -> Vec<NamedCase<Self>>
fn benchmark_cases(ctx: &CaseContext<'_>) -> Vec<NamedCase<Self>>
The cases, in a stable order. An empty list means “nothing to benchmark in this
repository”, which the coverage check reports as missing.
Source§fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
The cases as JSON, the shape every runner serialises from.
Source§impl Clone for IntentBindingInput
impl Clone for IntentBindingInput
Source§fn clone(&self) -> IntentBindingInput
fn clone(&self) -> IntentBindingInput
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 IntentBindingInput
impl Debug for IntentBindingInput
Source§impl Default for IntentBindingInput
impl Default for IntentBindingInput
Source§fn default() -> IntentBindingInput
fn default() -> IntentBindingInput
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for IntentBindingInput
impl<'de> Deserialize<'de> for IntentBindingInput
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 IntentBindingInput
Source§impl JsonSchema for IntentBindingInput
impl JsonSchema for IntentBindingInput
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 IntentBindingInput
impl PartialEq for IntentBindingInput
Source§fn eq(&self, other: &IntentBindingInput) -> bool
fn eq(&self, other: &IntentBindingInput) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for IntentBindingInput
impl Serialize for IntentBindingInput
impl StructuralPartialEq for IntentBindingInput
Auto Trait Implementations§
impl Freeze for IntentBindingInput
impl RefUnwindSafe for IntentBindingInput
impl Send for IntentBindingInput
impl Sync for IntentBindingInput
impl Unpin for IntentBindingInput
impl UnsafeUnpin for IntentBindingInput
impl UnwindSafe for IntentBindingInput
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.