Struct Error
struct Error { ... }
Notify error type.
Errors are emitted either at creation time of a Watcher, or during the event stream. They
range from kernel errors to filesystem errors to argument errors.
Errors can be general, or they can be about specific paths or subtrees. In that later case, the
error's paths field will be populated.
Fields
kind: ErrorKindKind of the error.
paths: Vec<PathBuf>Relevant paths to the error, if any.
Implementations
impl Error
fn add_path(self: Self, path: PathBuf) -> SelfAdds a path to the error.
fn set_paths(self: Self, paths: Vec<PathBuf>) -> SelfReplaces the paths for the error.
fn new(kind: ErrorKind) -> SelfCreates a new Error with empty paths given its kind.
fn generic(msg: &str) -> SelfCreates a new generic Error from a message.
fn io(err: Error) -> SelfCreates a new i/o Error from a stdlib
io::Error.fn io_watch(err: Error) -> SelfSimilar to
Error::io, but specifically handlesio::ErrorKind::NotFound.fn path_not_found() -> SelfCreates a new "path not found" error.
fn watch_not_found() -> SelfCreates a new "watch not found" error.
fn invalid_config(config: &Config) -> SelfCreates a new "invalid config" error from the given
Config.
impl Debug for Error
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Display for Error
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Error for Error
fn cause(self: &Self) -> Option<&dyn StdError>
impl Freeze for Error
impl From for Error
fn from(err: Error) -> Self
impl From for Error
fn from(err: RecvError) -> Self
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
impl<T> Any for Error
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Error
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Error
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Error
fn from(err: SendError<T>) -> Self
impl<T> From for Error
fn from(err: PoisonError<T>) -> Self
impl<T> From for Error
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToString for Error
fn to_string(self: &Self) -> String
impl<T, U> Into for Error
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Error
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Error
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>