pub struct TransferReport {
pub id: u64,
pub kind: TransferKind,
pub label: String,
pub done: Vec<(PathBuf, PathBuf)>,
pub skipped: Vec<PathBuf>,
pub vanished: Vec<PathBuf>,
pub failed: Vec<(PathBuf, String)>,
}Expand description
What became of a TransferJob.
Every entry ends up in exactly one of the four lists. Nothing is ever
overwritten: an occupied destination is skipped, never replaced.
Fields§
§id: u64The job this answers.
kind: TransferKindCopy or move.
label: StringThe command that started it.
done: Vec<(PathBuf, PathBuf)>Entries transferred, as (source, dest).
skipped: Vec<PathBuf>Entries left alone because their destination name was taken.
vanished: Vec<PathBuf>Entries that no longer existed when their turn came.
failed: Vec<(PathBuf, String)>Entries that failed, with the reason.
Implementations§
Source§impl TransferReport
impl TransferReport
Sourcepub fn summary(&self) -> String
pub fn summary(&self) -> String
One status-bar line: paste: 2 copied, 1 skipped: exists.
A single entry that failed or was skipped is reported by its reason
alone, which is what :mv and :cp have always said.
Sourcepub fn has_failures(&self) -> bool
pub fn has_failures(&self) -> bool
Whether to report this as an error: something failed, or nothing at all was transferred. A batch with some entries skipped and others done is a success that mentions the skips.
Trait Implementations§
Source§impl Clone for TransferReport
impl Clone for TransferReport
Source§impl Debug for TransferReport
impl Debug for TransferReport
impl Eq for TransferReport
Source§impl PartialEq for TransferReport
impl PartialEq for TransferReport
impl StructuralPartialEq for TransferReport
Auto Trait Implementations§
impl Freeze for TransferReport
impl RefUnwindSafe for TransferReport
impl Send for TransferReport
impl Sync for TransferReport
impl Unpin for TransferReport
impl UnsafeUnpin for TransferReport
impl UnwindSafe for TransferReport
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
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