pub struct RefEntry {
pub ref: String,
pub args: Option<String>,
pub name: Option<String>,
}Expand description
A reference to a named definition in the definitions section.
Supports two optional overrides that are applied at the point of use, without modifying the shared definition:
hooks:
pre-commit:
commands:
- $ref: lint # use definition as-is
- $ref: lint
args: "--fix" # appends to the definition's run command
name: lint-fix # overrides the display labelFields§
§ref: StringName of the definition to reference.
args: Option<String>Extra arguments appended to the definition’s run command.
The final command executed is {definition.run} {args}.
For example, if the definition runs npm run lint, setting
args: "--fix" produces npm run lint --fix.
name: Option<String>Override the display name shown in hook output for this specific use.
When omitted, the definition’s own name is used.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RefEntry
impl<'de> Deserialize<'de> for RefEntry
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 RefEntry
impl JsonSchema for RefEntry
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
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 is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for RefEntry
impl RefUnwindSafe for RefEntry
impl Send for RefEntry
impl Sync for RefEntry
impl Unpin for RefEntry
impl UnsafeUnpin for RefEntry
impl UnwindSafe for RefEntry
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