Skip to main content

Preset

Enum Preset 

Source
pub enum Preset {
    Default,
    Dependencies,
    AllIgnored,
    All,
}
Expand description

A named point on the two axes, which is what one key cycles through.

§The cycle is a path through the lattice, one axis at a time

default → dependencies → all-ignored → all, and each step moves exactly one axis while retaining the other:

tierkind
defaultnamedevery kind
dependenciesnameddependencies ← kind narrows
all-ignorednamed + gitignored ← tier widensdependencies
allnamed + gitignoredevery kind ← kind widens

That is what makes them four distinct views rather than three wearing four names, and it is what the asked-for order is for: read as a path, all-ignored is “the view I am on, plus the gitignored tier”, which is precisely the sentence the tier axis makes available.

An earlier pass mapped all-ignored and all to one point and told them apart by having all clear the / pattern. Adversarial review rejected that and was right twice over: it left a step of the cycle doing nothing to the axes, and it reached for the pattern — which is orthogonal to both axes — to manufacture a difference. The pattern is never touched by a preset now.

Variants§

§

Default

What a rule could put a name to: tier one, every kind. Where a run starts.

It hides the gitignored tier, so super::render says how many claims that is on the header — a view that narrows without saying what it dropped is the “silently keeps” failure the age floor was already resolved against.

§

Dependencies

Installed third-party code, and only that: npkill’s vendor. The kind axis narrowed, the tier axis exactly as default had it.

§

AllIgnored

The step before it, and also the gitignore fallback: the tier axis widened, the kind narrowing retained.

§

All

Everything the scan found: both tiers, every kind.

Implementations§

Source§

impl Preset

Source

pub const ALL: [Self; 4]

Every preset, in the order f walks them — the order the request names them in.

Source

pub fn next(self) -> Self

The next one round.

Source

pub fn prev(self) -> Self

The one before.

Source

pub fn label(self) -> &'static str

What the footer calls this view.

Source

pub fn what(self) -> &'static str

The sentence the footer says when the view changes, which has to name what is now missing: a reader who cannot see a claim has no way to notice it was hidden rather than never found.

Source

pub fn axes(self) -> (Tiers, Kinds)

Where this preset sits on the two axes.

One axis moves per step and the other is retained — see the type’s own docs for the table, and note that no preset touches the / pattern.

Trait Implementations§

Source§

impl Clone for Preset

Source§

fn clone(&self) -> Preset

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 Copy for Preset

Source§

impl Debug for Preset

Source§

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

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

impl Default for Preset

Source§

fn default() -> Preset

Returns the “default value” for a type. Read more
Source§

impl Display for Preset

Source§

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

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

impl Eq for Preset

Source§

impl PartialEq for Preset

Source§

fn eq(&self, other: &Preset) -> 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 Preset

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToCompactString for T
where T: Display,

Source§

impl<T> ToLine for T
where T: Display,

Source§

fn to_line(&self) -> Line<'_>

Converts the value to a Line.
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> ToSpan for T
where T: Display,

Source§

fn to_span(&self) -> Span<'_>

Converts the value to a Span.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToText for T
where T: Display,

Source§

fn to_text(&self) -> Text<'_>

Converts the value to a Text.
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.