Skip to main content

SourceError

Enum SourceError 

Source
pub enum SourceError {
Show 33 variants InvalidRoot { root: &'static str, reason: &'static str, }, ProjectOutsideWorkspace, NonUtf8Path, NonPortablePath { path: String, reason: PortablePathReason, }, SensitivePath { path: String, }, SensitiveContent { path: String, }, ReparsePoint { path: String, }, AlternateDataStream { path: String, }, StreamInspectionUnavailable { path: String, }, MissingInput { path: String, }, Symlink { path: String, }, HardLink { path: String, links: u64, }, HardLinkInspectionUnavailable { path: String, }, UnsupportedFileType { path: String, }, CaseCollision { first: String, second: String, }, LimitExceeded { kind: SourceLimitKind, path: Option<String>, maximum: u64, actual: u64, }, UnsupportedDepthLimit { requested: usize, maximum: usize, }, UnsupportedTraversalLimit { requested: usize, maximum: usize, }, DuplicateExecutableMode { path: String, }, ExecutableModePathNotSelected { path: String, }, InvalidIgnoreRule { file: String, line: usize, reason: IgnoreRuleReason, }, ChangedDuringRead { path: String, }, InvalidManifest { reason: &'static str, }, ManifestMismatch, OutputExists { path: String, }, DestinationExists { path: String, }, InvalidDestination { reason: &'static str, }, InvalidArchive { reason: String, }, InvalidGitSnapshot { reason: String, }, ArchiveIntegrityMismatch { reason: &'static str, }, CleanupFailed { path: String, original: String, source: Error, }, Zip { operation: &'static str, message: String, }, Io { operation: &'static str, path: String, source: Error, },
}
Expand description

Source planning or verification failure.

Variants§

§

InvalidRoot

A configured root did not resolve to a real directory.

Fields

§root: &'static str

Which root was invalid.

§reason: &'static str

Stable reason without file contents.

§

ProjectOutsideWorkspace

The project resolved outside the configured workspace.

§

NonUtf8Path

A filesystem path could not be represented as UTF-8.

§

NonPortablePath

A relative bundle path was not cross-platform portable.

Fields

§path: String

Rejected path.

§reason: PortablePathReason

Validation reason.

§

SensitivePath

A built-in sensitive path was explicitly selected or found in a bundle.

Fields

§path: String

Portable path; secret contents are never included.

§

SensitiveContent

A selected regular file contained a conservative credential signature.

Fields

§path: String

Portable source path; credential contents are never included.

§

ReparsePoint

A Windows reparse point or junction was found in selected source.

Fields

§path: String

Portable workspace-relative path or root role.

§

AlternateDataStream

A selected Windows regular file has a named alternate data stream.

Fields

§path: String

Portable workspace-relative path; stream names are never retained.

§

StreamInspectionUnavailable

A selected Windows regular file’s streams could not be inspected safely.

Fields

§path: String

Portable workspace-relative path.

§

MissingInput

A selected path did not exist.

Fields

§path: String

Portable workspace-relative path.

A symbolic link was found in selected source.

Fields

§path: String

Portable workspace-relative path.

A regular file had more than one filesystem link.

Fields

§path: String

Portable workspace-relative path.

§links: u64

Observed link count.

§

HardLinkInspectionUnavailable

Link-count inspection is unavailable on this platform or filesystem.

Fields

§path: String

Portable workspace-relative path.

§

UnsupportedFileType

A socket, device, FIFO, or other unsupported file type was selected.

Fields

§path: String

Portable workspace-relative path.

§

CaseCollision

Two paths would alias on a case-insensitive filesystem.

Fields

§first: String

First portable path.

§second: String

Conflicting portable path.

§

LimitExceeded

A resource bound was exceeded.

Fields

§kind: SourceLimitKind

Bound that was exceeded.

§path: Option<String>

Related portable path, when applicable.

§maximum: u64

Configured maximum.

§actual: u64

Observed value.

§

UnsupportedDepthLimit

The configured depth exceeds the defensive ceiling.

Fields

§requested: usize

Requested depth.

§maximum: usize

Defensive maximum.

§

UnsupportedTraversalLimit

The requested traversal-entry limit exceeds the defensive ceiling.

Fields

§requested: usize

Requested traversal entries.

§maximum: usize

Defensive maximum.

§

DuplicateExecutableMode

Portable executable metadata repeated the same path.

Fields

§path: String

Duplicated workspace-relative path.

§

ExecutableModePathNotSelected

Portable executable metadata named a file outside the final selection.

Fields

§path: String

Workspace-relative path absent from the manifest.

§

InvalidIgnoreRule

A .ferryignore line was outside the documented safe subset.

Fields

§file: String

Portable ignore-file path.

§line: usize

One-based line number.

§reason: IgnoreRuleReason

Rejection reason.

§

ChangedDuringRead

A source file changed while it was being read.

Fields

§path: String

Portable workspace-relative path.

§

InvalidManifest

A manifest was structurally invalid or non-canonical.

Fields

§reason: &'static str

Stable validation reason.

§

ManifestMismatch

Current source or materialized contents did not exactly match a manifest.

§

OutputExists

An output path already exists and was not modified.

Fields

§path: String

Existing output path.

§

DestinationExists

An extraction destination already exists and was not modified.

Fields

§path: String

Existing destination path.

§

InvalidDestination

An archive or extraction destination path was unusable.

Fields

§reason: &'static str

Stable validation reason.

§

InvalidArchive

ZIP structure or metadata violated the source transport contract.

Fields

§reason: String

Stable or safely quoted rejection reason.

§

InvalidGitSnapshot

Git snapshot fields or cross-document bindings were invalid.

Fields

§reason: String

Stable rejection reason without request or source contents.

§

ArchiveIntegrityMismatch

ZIP bytes did not match their transport descriptor.

Fields

§reason: &'static str

Stable validation reason.

§

CleanupFailed

Cleanup of an operation-created partial path failed.

Fields

§path: String

Exact operation-created path.

§original: String

Original failure that triggered cleanup.

§source: Error

Cleanup failure.

§

Zip

ZIP processing failed.

Fields

§operation: &'static str

ZIP operation being performed.

§message: String

Library error without source file contents.

§

Io

A filesystem operation failed.

Fields

§operation: &'static str

Operation being performed.

§path: String

Portable path or root role; never file contents.

§source: Error

Underlying operating-system error.

Trait Implementations§

Source§

impl Debug for SourceError

Source§

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

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

impl Display for SourceError

Source§

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

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

impl Error for SourceError

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.

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.

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.