Skip to main content

Kind

Enum Kind 

Source
pub enum Kind {
    Runnable {
        scope: Scope,
        severity: Severity,
        program: String,
        args: Vec<String>,
        fix: Fix,
        files: bool,
        docs_skip: bool,
        heavy: bool,
        runs_on: RunsOn,
        pending_trigger: Option<Box<Trigger>>,
        trigger: Option<Box<Trigger>>,
    },
    Unusable {
        why: String,
        declared: Option<Severity>,
    },
}
Expand description

The two things an external can be. Scope and Severity live only on the runnable side, so a broken external cannot carry a severity nobody applies.

Variants§

§

Runnable

Fields

§scope: Scope
§severity: Severity
§program: String
§args: Vec<String>
§fix: Fix
§files: bool

The command column began files — append the matched paths to the argv, the way a builtin hands its tool the staged list.

§docs_skip: bool

The command column began docs-skip — see Declared::docs_skip.

§heavy: bool

The command column carried heavy — see Declared::heavy.

§runs_on: RunsOn

See RunsOn. A Runnable exists only for a trusted manifest (gate), so AnyPlatform is always the trusted declaration.

§pending_trigger: Option<Box<Trigger>>

What this pre-commit declaration would fire on if its push twin’s files counted too: its own scope united with the twin’s. Computed at load (attach_twin_scopes), and NOT applied until Manifest::resolve_triggers has judged the declaration blocking: until then External::effective_scope is the declaration’s own, so a caller that forgets the resolve behaves as before the twin existed — narrow, and the push runs the suite.

§trigger: Option<Box<Trigger>>

The pending trigger, once resolved for a declaration that blocks. What the declaration fires on at commit and is judged on at push. Boxed, like the pending one: most declarations carry neither, and two inline scopes made this variant several times the size of Unusable.

§

Unusable

Fields

§declared: Option<Severity>

The severity the line declares, when it parsed and only trust is withheld: kept for amont list to report, never applied. None for a line that did not parse.

Auto Trait Implementations§

§

impl Forget for Kind

§

impl Freeze for Kind

§

impl Move for Kind

§

impl RefUnwindSafe for Kind

§

impl Send for Kind

§

impl Sync for Kind

§

impl Unpin for Kind

§

impl UnsafeUnpin for Kind

§

impl UnwindSafe for Kind

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.