pub struct FsError { /* private fields */ }Expand description
A filesystem error with a stable code, human-readable message, and safe details.
Implementations§
Source§impl FsError
impl FsError
Sourcepub fn new(code: ErrorCode, message: impl Into<String>, details: Value) -> Self
pub fn new(code: ErrorCode, message: impl Into<String>, details: Value) -> Self
Creates an error with the supplied stable code, message, and structured details.
Sourcepub fn invalid_path_or_name(subject: impl Display) -> Self
pub fn invalid_path_or_name(subject: impl Display) -> Self
Creates an invalid path or name error.
Sourcepub fn already_exists(subject: impl Display) -> Self
pub fn already_exists(subject: impl Display) -> Self
Creates an already-exists error.
Sourcepub fn wrong_node_type(subject: impl Display) -> Self
pub fn wrong_node_type(subject: impl Display) -> Self
Creates a wrong-node-type error.
Sourcepub fn directory_not_empty(subject: impl Display) -> Self
pub fn directory_not_empty(subject: impl Display) -> Self
Creates a directory-not-empty error.
Sourcepub fn broken_link(subject: impl Display) -> Self
pub fn broken_link(subject: impl Display) -> Self
Creates a broken-link error.
Sourcepub fn workspace_boundary_violation(subject: impl Display) -> Self
pub fn workspace_boundary_violation(subject: impl Display) -> Self
Creates a workspace-boundary-violation error.
Sourcepub fn permission_denied(subject: impl Display) -> Self
pub fn permission_denied(subject: impl Display) -> Self
Creates a permission-denied error.
Sourcepub fn revision_conflict(subject: impl Display) -> Self
pub fn revision_conflict(subject: impl Display) -> Self
Creates a revision-conflict error.
Sourcepub fn quota_exceeded(subject: impl Display) -> Self
pub fn quota_exceeded(subject: impl Display) -> Self
Creates a quota-exceeded error.
Sourcepub fn invalid_range(subject: impl Display) -> Self
pub fn invalid_range(subject: impl Display) -> Self
Creates an invalid-range error.
Sourcepub fn invalid_cursor(subject: impl Display) -> Self
pub fn invalid_cursor(subject: impl Display) -> Self
Creates an invalid-cursor error.
Sourcepub fn storage_busy(subject: impl Display) -> Self
pub fn storage_busy(subject: impl Display) -> Self
Creates a storage-busy error.
Sourcepub fn internal_storage_failure(subject: impl Display) -> Self
pub fn internal_storage_failure(subject: impl Display) -> Self
Creates an internal-storage-failure error.
Trait Implementations§
Source§impl Error for FsError
impl Error for FsError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for FsError
impl RefUnwindSafe for FsError
impl Send for FsError
impl Sync for FsError
impl Unpin for FsError
impl UnsafeUnpin for FsError
impl UnwindSafe 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