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: ErrorThe original error
origin: Option<PathOp>The operation that caused the error.
If set, all operations before it were applied successfully.
Noneif 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, handleoriginfirst (if present), thenremaining.
Implementations
impl UpdatePathsError
fn new(source: Error, origin: Option<PathOp>, remaining: Vec<PathOp>) -> SelfCreates a batch update error.
originis the failed operation, if known.remainingcontains only operations that were not attempted and must not includeorigin.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