pub struct ValidateInput {
pub message: String,
pub paths: Option<Vec<String>>,
}Expand description
A message to judge, and what is known about the commit it would make.
use majordomus_cli::capability::builtin::commit::ValidateInput;
// paths are optional: a caller that does not know them gets the judgements that need
// none, rather than a guess
let v: ValidateInput = serde_json::from_str(r#"{"message": "feat(a): a thing"}"#).unwrap();
assert!(v.paths.is_none());Fields§
§message: StringThe commit message, as it would be stored. Comment lines are ignored, as git ignores them, so what is judged is what would be committed.
paths: Option<Vec<String>>The paths the commit would contain. Omit them and the judgements that need them — whether a fix carries a test — are not made rather than guessed.
Trait Implementations§
Source§impl BenchmarkCases for ValidateInput
impl BenchmarkCases for ValidateInput
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 Debug for ValidateInput
impl Debug for ValidateInput
Source§impl<'de> Deserialize<'de> for ValidateInput
impl<'de> Deserialize<'de> for ValidateInput
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 ValidateInput
impl JsonSchema for ValidateInput
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 ValidateInput
impl RefUnwindSafe for ValidateInput
impl Send for ValidateInput
impl Sync for ValidateInput
impl Unpin for ValidateInput
impl UnsafeUnpin for ValidateInput
impl UnwindSafe for ValidateInput
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