Skip to main content

StaleReport

Struct StaleReport 

Source
pub struct StaleReport<'a> { /* private fields */ }
Expand description

What cleanup found, and the words it uses to say so.

The two halves of cleanup – listing stale entries and removing them – print the same three things in the same order and differ only in tense. Holding the tense here leaves one printing path instead of two.

Implementations§

Source§

impl<'a> StaleReport<'a>

Source

pub const fn dry_run(entries: Vec<&'a IgnoreEntry>) -> Self

Entries that would go, had this not been a dry run.

Source

pub const fn removed(entries: Vec<&'a IgnoreEntry>) -> Self

Entries that have gone.

Source

pub const fn is_empty(&self) -> bool

Whether the ignore file held nothing stale.

Source

pub fn entries(&self) -> &[&'a IgnoreEntry]

The entries themselves, in the order they were found.

Source

pub const fn heading(&self) -> &'static str

The line introducing the list.

Source

pub fn summary(&self) -> String

The line closing it, which is where the tense shows.

Auto Trait Implementations§

§

impl<'a> Freeze for StaleReport<'a>

§

impl<'a> RefUnwindSafe for StaleReport<'a>

§

impl<'a> Send for StaleReport<'a>

§

impl<'a> Sync for StaleReport<'a>

§

impl<'a> Unpin for StaleReport<'a>

§

impl<'a> UnsafeUnpin for StaleReport<'a>

§

impl<'a> UnwindSafe for StaleReport<'a>

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.