Skip to main content

TreeGate

Struct TreeGate 

Source
pub struct TreeGate {
    pub name: String,
    pub tool: TreeTool,
    pub exts: Vec<String>,
    pub names: Vec<String>,
    pub dirs: Vec<String>,
    pub opt_in: Vec<String>,
    pub cwd: Option<String>,
    pub inputs: Vec<String>,
    pub command: String,
    pub lineno: usize,
}
Expand description

tree <name> <tool> <scope> attest [cwd=<dir>] [inputs=<path>,...] <command> — a whole-tree check whose pass may be ATTESTED so CI skips the step that runs the same command (ADR-0024).

The declaration IS the CI command. normalized() is what the workflow step’s run: must equal, character for character; {cache} is the only thing amont may add, and it never changes a verdict. A tree gate never decides a commit: it is not a pre-commit or pre-push check, so it has no severity column — attest stands where the severity would be, saying what the line is for.

Fields§

§name: String§tool: TreeTool§exts: Vec<String>§names: Vec<String>§dirs: Vec<String>§opt_in: Vec<String>§cwd: Option<String>

The directory the command runs in, relative to the repository root.

§inputs: Vec<String>

Extra paths that belong to the gate’s cache namespace.

§command: String

The command as declared, {cache} and all.

§lineno: usize

Implementations§

Source§

impl TreeGate

Source

pub fn id(&self) -> String

The gate token in the attestation note — what CI’s if: names.

Source

pub fn stamp_key(&self) -> String

The key a tree proof is stamped under. Distinct from every commit-stamp token (short names like cargo-test) by its :, so no per-commit reader can mistake a staged-only pass for a whole-tree one.

Source

pub fn normalized(&self) -> String

The command CI must run: {cache} removed, then a dangling trailing -- (left behind by npm run lint -- {cache}), then whitespace collapsed.

Trait Implementations§

Source§

impl Clone for TreeGate

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TreeGate

Source§

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

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

impl Eq for TreeGate

Source§

impl PartialEq for TreeGate

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TreeGate

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.