FsError

Enum FsError 

Source
pub enum FsError {
Show 36 variants Inspect { path: PathBuf, source: Error, }, Remove { path: PathBuf, source: Error, }, RemoveAndDefer { path: PathBuf, deferred_path: PathBuf, source: Error, }, CreateDirectory { path: PathBuf, source: Error, }, CreateExtractedFile { path: PathBuf, source: Error, }, CreateTempFile { path: PathBuf, source: Error, }, WriteTempFile { path: PathBuf, source: Error, }, SyncTempFile { path: PathBuf, source: Error, }, FinalizeFile { temp_path: PathBuf, final_path: PathBuf, source: Error, }, OpenZipArchive { zip_path: PathBuf, source: Box<dyn StdError + Send + Sync + 'static>, }, OpenArchive { archive_path: PathBuf, source: Box<dyn StdError + Send + Sync + 'static>, }, ReadZipEntry { path: PathBuf, source: Box<dyn StdError + Send + Sync + 'static>, }, ReadArchiveEntry { path: PathBuf, source: Box<dyn StdError + Send + Sync + 'static>, }, ReadEntry { path: PathBuf, source: Error, }, WriteEntry { path: PathBuf, source: Error, }, ReadDirectory { path: PathBuf, source: Error, }, ReadDirectoryEntry { path: PathBuf, source: Error, }, CopyFile { source_path: PathBuf, target_path: PathBuf, source: Error, }, InvalidZipEntryPath, InvalidArchiveEntryPath, SymlinkEntry { path: PathBuf, }, SuspiciousCompressionRatio { path: PathBuf, uncompressed_size: u64, compressed_size: u64, max_ratio: u64, }, QuotaExceeded { max_total_size: u64, current_total_size: u64, entry_size: u64, }, PathTooDeep { path: PathBuf, depth: usize, max_depth: usize, }, ArchiveBackendUnavailable { archive_kind: &'static str, }, ArchiveBackendFailed { archive_kind: &'static str, archive_path: PathBuf, backend_path: PathBuf, source: Box<dyn StdError + Send + Sync + 'static>, }, FileCountExceeded { max_file_count: usize, current_file_count: usize, }, ReparsePoint { path: PathBuf, }, PathNotDirectory { path: PathBuf, }, HardlinkedTarget { path: PathBuf, }, CopyAcrossVolumes { source_dir: PathBuf, target_dir: PathBuf, source: Box<dyn StdError + Send + Sync + 'static>, }, MoveIntoPlace { source_dir: PathBuf, target_dir: PathBuf, source: Error, }, MoveAside { target_dir: PathBuf, backup_dir: PathBuf, source: Error, }, RollbackFailed { action: &'static str, source_dir: PathBuf, target_dir: PathBuf, source: Box<dyn StdError + Send + Sync + 'static>, rollback_error: Box<dyn StdError + Send + Sync + 'static>, }, CopySymlink { source_path: PathBuf, }, UnsupportedEntry { source_path: PathBuf, },
}

Variants§

§

Inspect

Fields

§path: PathBuf
§source: Error
§

Remove

Fields

§path: PathBuf
§source: Error
§

RemoveAndDefer

Raised when immediate deletion fails and the path cannot be renamed for deferred cleanup.

Fields

§path: PathBuf
§deferred_path: PathBuf
§source: Error
§

CreateDirectory

Fields

§path: PathBuf
§source: Error
§

CreateExtractedFile

Fields

§path: PathBuf
§source: Error
§

CreateTempFile

Fields

§path: PathBuf
§source: Error
§

WriteTempFile

Fields

§path: PathBuf
§source: Error
§

SyncTempFile

Fields

§path: PathBuf
§source: Error
§

FinalizeFile

Fields

§temp_path: PathBuf
§final_path: PathBuf
§source: Error
§

OpenZipArchive

Fields

§zip_path: PathBuf
§source: Box<dyn StdError + Send + Sync + 'static>
§

OpenArchive

Fields

§archive_path: PathBuf
§source: Box<dyn StdError + Send + Sync + 'static>
§

ReadZipEntry

Fields

§path: PathBuf
§source: Box<dyn StdError + Send + Sync + 'static>
§

ReadArchiveEntry

Fields

§path: PathBuf
§source: Box<dyn StdError + Send + Sync + 'static>
§

ReadEntry

Fields

§path: PathBuf
§source: Error
§

WriteEntry

Fields

§path: PathBuf
§source: Error
§

ReadDirectory

Fields

§path: PathBuf
§source: Error
§

ReadDirectoryEntry

Fields

§path: PathBuf
§source: Error
§

CopyFile

Fields

§source_path: PathBuf
§target_path: PathBuf
§source: Error
§

InvalidZipEntryPath

§

InvalidArchiveEntryPath

§

SymlinkEntry

Fields

§path: PathBuf
§

SuspiciousCompressionRatio

Fields

§path: PathBuf
§uncompressed_size: u64
§compressed_size: u64
§max_ratio: u64
§

QuotaExceeded

Fields

§max_total_size: u64
§current_total_size: u64
§entry_size: u64
§

PathTooDeep

Fields

§path: PathBuf
§depth: usize
§max_depth: usize
§

ArchiveBackendUnavailable

Fields

§archive_kind: &'static str
§

ArchiveBackendFailed

Fields

§archive_kind: &'static str
§archive_path: PathBuf
§backend_path: PathBuf
§source: Box<dyn StdError + Send + Sync + 'static>
§

FileCountExceeded

Fields

§max_file_count: usize
§current_file_count: usize
§

ReparsePoint

Fields

§path: PathBuf
§

PathNotDirectory

Fields

§path: PathBuf
§

HardlinkedTarget

Fields

§path: PathBuf
§

CopyAcrossVolumes

Fields

§source_dir: PathBuf
§target_dir: PathBuf
§source: Box<dyn StdError + Send + Sync + 'static>
§

MoveIntoPlace

Fields

§source_dir: PathBuf
§target_dir: PathBuf
§source: Error
§

MoveAside

Fields

§target_dir: PathBuf
§backup_dir: PathBuf
§source: Error
§

RollbackFailed

Raised when staged replacement fails and restoring the backup also fails.

Fields

§action: &'static str
§source_dir: PathBuf
§target_dir: PathBuf
§source: Box<dyn StdError + Send + Sync + 'static>
§rollback_error: Box<dyn StdError + Send + Sync + 'static>

Fields

§source_path: PathBuf
§

UnsupportedEntry

Fields

§source_path: PathBuf

Implementations§

Source§

impl FsError

Source

pub(crate) fn inspect(path: &Path, source: Error) -> Self

Source

pub(crate) fn remove(path: &Path, source: Error) -> Self

Source

pub(crate) fn remove_and_defer( path: &Path, deferred_path: &Path, source: Error, ) -> Self

Source

pub(crate) fn create_directory(path: &Path, source: Error) -> Self

Source

pub(crate) fn create_extracted_file(path: &Path, source: Error) -> Self

Source

pub(crate) fn archive_backend_unavailable(archive_kind: &'static str) -> Self

Source

pub(crate) fn archive_backend_failed( archive_kind: &'static str, archive_path: &Path, backend_path: &Path, source: impl StdError + Send + Sync + 'static, ) -> Self

Source

pub(crate) fn create_temp_file(path: &Path, source: Error) -> Self

Source

pub(crate) fn write_temp_file(path: &Path, source: Error) -> Self

Source

pub(crate) fn sync_temp_file(path: &Path, source: Error) -> Self

Source

pub(crate) fn finalize_file( temp_path: &Path, final_path: &Path, source: Error, ) -> Self

Source

pub(crate) fn open_zip_archive( zip_path: &Path, source: impl StdError + Send + Sync + 'static, ) -> Self

Source

pub(crate) fn open_archive( archive_path: &Path, source: impl StdError + Send + Sync + 'static, ) -> Self

Source

pub(crate) fn read_zip_entry( path: &Path, source: impl StdError + Send + Sync + 'static, ) -> Self

Source

pub(crate) fn read_archive_entry( path: &Path, source: impl StdError + Send + Sync + 'static, ) -> Self

Source

pub(crate) fn read_entry(path: &Path, source: Error) -> Self

Source

pub(crate) fn write_entry(path: &Path, source: Error) -> Self

Source

pub(crate) fn read_directory(path: &Path, source: Error) -> Self

Source

pub(crate) fn read_directory_entry(path: &Path, source: Error) -> Self

Source

pub(crate) fn copy_file( source_path: &Path, target_path: &Path, source: Error, ) -> Self

Source

pub(crate) fn invalid_zip_entry_path() -> Self

Source

pub(crate) fn invalid_archive_entry_path() -> Self

Source

pub(crate) fn symlink_entry(path: &Path) -> Self

Source

pub(crate) fn suspicious_compression_ratio( path: &Path, uncompressed_size: u64, compressed_size: u64, max_ratio: u64, ) -> Self

Source

pub(crate) fn quota_exceeded( max_total_size: u64, current_total_size: u64, entry_size: u64, ) -> Self

Source

pub(crate) fn path_too_deep(path: &Path, depth: usize, max_depth: usize) -> Self

Source

pub(crate) fn file_count_exceeded( max_file_count: usize, current_file_count: usize, ) -> Self

Source

pub(crate) fn reparse_point(path: &Path) -> Self

Source

pub(crate) fn path_not_directory(path: &Path) -> Self

Source

pub(crate) fn hardlinked_target(path: &Path) -> Self

Source

pub(crate) fn copy_across_volumes( source_dir: &Path, target_dir: &Path, source: impl StdError + Send + Sync + 'static, ) -> Self

Source

pub(crate) fn move_into_place( source_dir: &Path, target_dir: &Path, source: Error, ) -> Self

Source

pub(crate) fn move_aside( target_dir: &Path, backup_dir: &Path, source: Error, ) -> Self

Source

pub(crate) fn rollback_failed( action: &'static str, source_dir: &Path, target_dir: &Path, source: impl StdError + Send + Sync + 'static, rollback_error: impl StdError + Send + Sync + 'static, ) -> Self

Source

pub(crate) fn unsupported_entry(source_path: &Path) -> Self

Trait Implementations§

Source§

impl Debug for FsError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for FsError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Error for FsError

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more