Skip to main content

Hook

Struct Hook 

Source
pub struct Hook {
Show 15 fields pub id: String, pub alias: Option<String>, pub name: Option<String>, pub language_version: Option<String>, pub files: Option<String>, pub exclude: Option<String>, pub types: Option<Vec<String>>, pub types_or: Option<Vec<String>>, pub exclude_types: Option<Vec<String>>, pub args: Vec<String>, pub stages: Option<Vec<String>>, pub additional_dependencies: Vec<String>, pub always_run: bool, pub verbose: bool, pub log_file: Option<String>,
}
Expand description

A single hook.

Fields§

§id: String

The ID of the hook to use.

§alias: Option<String>

An optional additional ID to use when referring to the hook.

§name: Option<String>

Overrides the name of the hook, as shown during execution.

§language_version: Option<String>

Overrides the language version for the hook.

§files: Option<String>

Overrides the files pattern for the hook.

§exclude: Option<String>

Overrides the exclude pattern for the hook.

§types: Option<Vec<String>>

Overrides the default file types to run on for the hook (AND).

§types_or: Option<Vec<String>>

Overrides the default file types to run on for the hook (OR).

§exclude_types: Option<Vec<String>>

Overrides the types to exclude for the hook.

§args: Vec<String>

Optional list of additional args to supply to the hook.

§stages: Option<Vec<String>>

Overrides the set of stages to run the hook for.

§additional_dependencies: Vec<String>

Additional dependencies to install into the hook’s environment.

§always_run: bool

If true, run the hook even when there are no matching files.

§verbose: bool

If true, force the hook’s output to be printed even if it passes.

§log_file: Option<String>

If present, additionally append the hook’s log output to this file.

Trait Implementations§

Source§

impl Debug for Hook

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Hook

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for Hook

§

impl RefUnwindSafe for Hook

§

impl Send for Hook

§

impl Sync for Hook

§

impl Unpin for Hook

§

impl UnsafeUnpin for Hook

§

impl UnwindSafe for Hook

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.