Skip to main content

Step

Enum Step 

Source
pub enum Step {
    Freeing(Freeing),
    Finished(Removed),
    Swept(PathBuf),
}
Expand description

What a removal reports while it is happening.

Three events rather than one, for the same reason crate::Found has three: the bytes leave the disk over seconds, the target is removed once, and the pool moves off it once. A live view needs all three — a row cannot show its size falling toward zero if the only news it ever gets is that the directory has already gone.

Finished and Swept are different questions and that is why both exist. “What happened to this directory” is answered only for a target something happened to, because a row dropped for a target the final report then lists as untouched is the view and the report disagreeing. “Where has the deleter got to” is answered for every target, because a batch that fails on all of them has still been worked through — and a position indicator that reads zero throughout is describing the outcome rather than the position.

§Every path here is the one the caller asked about

Not the resolved path the unlinkat was issued against — PlanTarget::requested, the spelling that went in. The two differ whenever the target is reached through a symlinked ancestor or named relatively, which on a real run is the common case and not the exotic one: a bare pristine scans ., so every claim it finds is spelled ./… and every one of them resolves to something else.

It is stated here because a caller cannot work around getting it wrong. A live view keys its rows on the paths it handed in, and a report in the other spelling matches none of them — silently, since a path that finds no row is indistinguishable from a row that was never drawn. What that looks like is a removal of 150 GiB during which nothing on screen moves except the one counter that needs no path.

Variants§

§

Freeing(Freeing)

Bytes have left the disk and this target is still being swept.

§

Finished(Removed)

The sweep removed something from this target, in whole or in part.

Emitted only when Removal::removed will carry this target too, which is the condition a row disappearing is allowed to rest on.

§

Swept(PathBuf)

The pool has moved off this target, whatever it managed — including nothing.

One per target in the plan, always, and always after any Finished for the same path. It is deliberately not a claim that anything was deleted: a target that failed before unlinking a single entry, or that had already vanished, is one the deleter is no longer working on, and that is the whole of what this says.

Trait Implementations§

Source§

impl Clone for Step

Source§

fn clone(&self) -> Step

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 Step

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Step

§

impl RefUnwindSafe for Step

§

impl Send for Step

§

impl Sync for Step

§

impl Unpin for Step

§

impl UnsafeUnpin for Step

§

impl UnwindSafe for Step

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> 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> 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 = 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.