pub enum BaselineKind {
DeadCode,
Dupes,
Health,
}Expand description
Which command saved a baseline file.
Written as the top-level kind of every baseline this version saves, spelled
exactly as the envelope root kinds, so a file states which command can read
it instead of leaving three formats to be told apart by the keys they happen
to carry. A file saved before the member exists carries no kind, which
classify_baseline_file falls back from.
Variants§
DeadCode
Saved by fallow dead-code (or fallow check), and by
fallow architecture.
The kind names the baseline format, not the command: fallow architecture runs the dead-code analysis, so it writes and reads this
format although its JSON envelope has kind: "architecture".
Dupes
Saved by fallow dupes.
Health
Saved by fallow health.
Implementations§
Source§impl BaselineKind
impl BaselineKind
Sourcepub fn prune_command(self, path: &Path, mode: BaselineMode) -> String
pub fn prune_command(self, path: &Path, mode: BaselineMode) -> String
The command that removes only the stale entries of the baseline at
path, in the mode that the file records. A prune in another mode
refuses the file.
Sourcepub fn prune_command_for_root(
self,
path: &Path,
mode: BaselineMode,
root: &Path,
) -> String
pub fn prune_command_for_root( self, path: &Path, mode: BaselineMode, root: &Path, ) -> String
The prune command with the analyzed root when it differs from the working directory.
Sourcepub const fn entry_noun(self) -> &'static str
pub const fn entry_noun(self) -> &'static str
One finding that an entry of this kind can match.
Sourcepub fn warn_on_staleness(
self,
staleness: BaselineStaleness,
path: &Path,
saved_mode: BaselineMode,
root: &Path,
)
pub fn warn_on_staleness( self, staleness: BaselineStaleness, path: &Path, saved_mode: BaselineMode, root: &Path, )
Print the staleness warning for a loaded baseline.
Trait Implementations§
Source§impl Clone for BaselineKind
impl Clone for BaselineKind
impl Copy for BaselineKind
Source§impl Debug for BaselineKind
impl Debug for BaselineKind
Source§impl<'de> Deserialize<'de> for BaselineKind
impl<'de> Deserialize<'de> for BaselineKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for BaselineKind
Source§impl PartialEq for BaselineKind
impl PartialEq for BaselineKind
Source§impl Serialize for BaselineKind
impl Serialize for BaselineKind
impl StructuralPartialEq for BaselineKind
Auto Trait Implementations§
impl Forget for BaselineKind
impl Freeze for BaselineKind
impl Move for BaselineKind
impl RefUnwindSafe for BaselineKind
impl Send for BaselineKind
impl Sync for BaselineKind
impl Unpin for BaselineKind
impl UnsafeUnpin for BaselineKind
impl UnwindSafe for BaselineKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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