Skip to main content

Pending

Struct Pending 

Source
pub struct Pending {
    pub targets: Vec<PathBuf>,
    pub entries: Vec<Entry>,
    pub bytes: u64,
    pub unpriced: usize,
    pub view: String,
    pub answer: Answer,
    /* private fields */
}
Expand description

The question the delete key asks, and everything it is holding while it asks.

It carries the targets the plan resolved, not “whatever is marked when the answer is taken”. The tree moves while a dialog is up — claims arrive, prices land, an earlier deletion finishes — and a deed that re-read the marks at the moment of the answer would remove a different set from the one the box described.

§It lists the batch, and that is the safety half of orthogonal selection

A selection that is independent of what is visible creates a hazard that did not exist when the two were the same thing, and the mitigation is that the box shows what it is holding — grouped by kind, with the hidden entries named as hidden and every one of them unmarkable from here. The answer to a surprise has to be better than “cancel and start again”.

Fields§

§targets: Vec<PathBuf>

Exactly what will be removed.

§entries: Vec<Entry>

Every directory the batch touched, refused ones included — what the listing draws.

§bytes: u64

What the plan says that is worth, which is only the part anybody has priced.

§unpriced: usize

How many of the targets carry no price.

§view: String

How the view that is hiding some of this spells itself, so the warning can name it.

§answer: Answer

Which answer is highlighted. Starts on cancel — the key a reader presses to get rid of what is in front of them has to be the safe one.

Implementations§

Source§

impl Pending

Source

pub fn entries(&self) -> &[Entry]

The lines, in the order they are drawn: grouped by kind, and by path inside a group.

Source

pub fn at(&self) -> usize

Which line the cursor is on.

Source

pub fn scroll(&self) -> usize

The first line drawn.

Source

pub fn page(&self) -> usize

How many lines the box has room for.

Source

pub fn hidden(&self) -> usize

How many of the entries the current view is hiding.

Source

pub fn unrecoverable(&self) -> usize

How many lines of this batch are things nothing brings back.

Counted over the lines that are actually going to be removed, refusals excluded: a directory the safety model is leaving standing is not one this warning is about, and counting it would put a red line over a batch that takes nothing precious.

Source

pub fn kept(&self) -> usize

How many the safety model will leave standing.

Trait Implementations§

Source§

impl Clone for Pending

Source§

fn clone(&self) -> Pending

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 Pending

Source§

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

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

impl Eq for Pending

Source§

impl PartialEq for Pending

Source§

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

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