pub enum Line {
Usable(Declared),
Tool(ToolPin),
Broken {
name: String,
stage: Stage,
lineno: usize,
why: ParseError,
},
}Variants§
Implementations§
Source§impl Line
impl Line
pub fn name(&self) -> &str
pub fn stage(&self) -> Stage
Sourcepub fn broken(&self) -> Option<String>
pub fn broken(&self) -> Option<String>
Some(reason) when this line declares a check that cannot run.
Sourcepub fn id(&self) -> String
pub fn id(&self) -> String
<trigger>-<name>, matching Declared::id and External::id. A broken
line has one too: hook.skip pre-commit should silence its nag exactly
as it silences the checks that do run.
Sourcepub fn into_parts(self) -> (String, Stage, Result<Declared, String>)
pub fn into_parts(self) -> (String, Stage, Result<Declared, String>)
Consume into the identity every line has, and either the declaration or the reason there is none.
Both consumers — External::from and the fleet’s projection — used to
destructure this by hand, and both carried an arm for a combination the
type forbids, because they computed the reason BEFORE matching. Written
once, that arm has nowhere to appear.
Trait Implementations§
impl Eq for Line
impl StructuralPartialEq for Line
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnsafeUnpin for Line
impl UnwindSafe for Line
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