Struct UpdatePathsError

#[non_exhaustive]
pub struct UpdatePathsError { pub source: Error, pub origin: Option<PathOp>, pub remaining: Vec<PathOp> }

The error provided by crate::Watcher::update_paths method.

Operations are applied in order. If an error occurs, processing stops and the error carries the failed operation (if known) and any remaining operations that were not attempted.

Fields

source: Error

The original error

origin: Option<PathOp>

The operation that caused the error.

If set, all operations before it were applied successfully. None if the error was not caused by a specific operation (e.g. failure to start the watcher after successfully updating paths).

remaining: Vec<PathOp>

The remaining operations that haven't been applied.

This list does not include origin. To retry in order, handle origin first (if present), then remaining.

Implementations

impl UpdatePathsError

fn new(source: Error, origin: Option<PathOp>, remaining: Vec<PathOp>) -> Self

Creates a batch update error.

origin is the failed operation, if known. remaining contains only operations that were not attempted and must not include origin.

Examples

use notify::{Error, PathOp, UpdatePathsError};

let error = UpdatePathsError::new(
    Error::watch_not_found(),
    Some(PathOp::unwatch("missing")),
    vec![PathOp::watch_recursive("next")],
);

Trait Implementations

impl Debug for UpdatePathsError

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

impl Display for UpdatePathsError

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

impl Error for UpdatePathsError

fn source(&self) -> Option<&dyn StdError + 'static>

impl IntoIterator for UpdatePathsError

type Item = PathOp;
type IntoIter = Chain<IntoIter<PathOp>, IntoIter<PathOp>>;
fn into_iter(self) -> Self::IntoIter

Auto Trait Implementations

impl !RefUnwindSafe for UpdatePathsError

impl !UnwindSafe for UpdatePathsError

impl Freeze for UpdatePathsError

impl Send for UpdatePathsError

impl Sync for UpdatePathsError

impl Unpin for UpdatePathsError

impl UnsafeUnpin for UpdatePathsError

Blanket Implementations

impl<T> Any for UpdatePathsError where T: 'static + ?Sized,

impl<T> Borrow<T> for UpdatePathsError where T: ?Sized,

impl<T> BorrowMut<T> for UpdatePathsError where T: ?Sized,

impl<T> From<T> for UpdatePathsError

impl<T> ToString for UpdatePathsError where T: Display + ?Sized,

impl<T, U> Into<U> for UpdatePathsError where U: From<T>,

impl<T, U> TryFrom<U> for UpdatePathsError where U: Into<T>,

impl<T, U> TryInto<U> for UpdatePathsError where U: TryFrom<T>,