pub struct FsError { /* private fields */ }Expand description
Error returned by a crate::session_fs::SessionFsProvider method.
The SDK maps this onto the wire schema’s SessionFsError:
FsErrorKind::NotFound becomes ENOENT, everything else becomes UNKNOWN.
Implementations§
Source§impl FsError
impl FsError
Sourcepub fn new<E>(kind: FsErrorKind, error: E) -> Self
pub fn new<E>(kind: FsErrorKind, error: E) -> Self
Construct a FsError wrapping a source error.
Sourcepub fn kind(&self) -> &FsErrorKind
pub fn kind(&self) -> &FsErrorKind
The FsErrorKind of this error.
Sourcepub fn message(&self) -> Option<&str>
pub fn message(&self) -> Option<&str>
The message provided when this error was constructed, or None.
Sourcepub fn with_message<C>(kind: FsErrorKind, message: C) -> Self
pub fn with_message<C>(kind: FsErrorKind, message: C) -> Self
Create a FsError with a custom message.
Trait Implementations§
Source§impl Error for FsError
impl Error for FsError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<FsErrorKind> for FsError
impl From<FsErrorKind> for FsError
Source§fn from(kind: FsErrorKind) -> Self
fn from(kind: FsErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for FsError
impl !UnwindSafe for FsError
impl Freeze for FsError
impl Send for FsError
impl Sync for FsError
impl Unpin for FsError
impl UnsafeUnpin for FsError
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
Mutably borrows from an owned value. Read more