pub struct CompletionInput {
pub changed: Option<Vec<String>>,
pub base: Option<String>,
pub on_demand: Option<bool>,
}Expand description
use majordomus_cli::capability::builtin::gates::CompletionInput;
// the default asks about the active task's own change set
let mine = CompletionInput::default();
assert!(mine.changed.is_none() && mine.base.is_none());
// and a caller may name the change instead, which is how a test drives it
let named = CompletionInput {
changed: Some(vec!["docs/CLI.md".into()]),
..Default::default()
};
assert_eq!(named.changed.unwrap(), ["docs/CLI.md"]);Which change to judge completion over.
Fields§
§changed: Option<Vec<String>>The changed paths, repository-relative. Absent means the task’s own change set: everything between the commit the task started at and the working tree.
base: Option<String>The commit to compare with, when the task’s own starting commit is not wanted.
on_demand: Option<bool>Also plan the gates the model marks on-demand. Off by default, because a plan that selects a gate whose runner is unavailable is a plan whose verdict never arrives.
Trait Implementations§
Source§impl BenchmarkCases for CompletionInput
impl BenchmarkCases for CompletionInput
Source§fn benchmark_cases(_: &CaseContext<'_>) -> Vec<NamedCase<Self>>
fn benchmark_cases(_: &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 CompletionInput
impl Clone for CompletionInput
Source§fn clone(&self) -> CompletionInput
fn clone(&self) -> CompletionInput
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 CompletionInput
impl Debug for CompletionInput
Source§impl Default for CompletionInput
impl Default for CompletionInput
Source§fn default() -> CompletionInput
fn default() -> CompletionInput
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CompletionInput
impl<'de> Deserialize<'de> for CompletionInput
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 CompletionInput
impl JsonSchema for CompletionInput
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 CompletionInput
impl RefUnwindSafe for CompletionInput
impl Send for CompletionInput
impl Sync for CompletionInput
impl Unpin for CompletionInput
impl UnsafeUnpin for CompletionInput
impl UnwindSafe for CompletionInput
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