Enum PathValidationError

Source
pub enum PathValidationError {
Show 17 variants AlpmCommon(Error), CreateHashDigest { path: PathBuf, source: Error, }, PathDigestMismatch { mtree_path: PathBuf, mtree_digest: Sha256Checksum, path: PathBuf, path_digest: Sha256Checksum, }, PathGidMismatch { mtree_path: PathBuf, mtree_gid: u32, path: PathBuf, path_gid: u32, }, PathMetadata { path: PathBuf, source: Error, }, PathMismatch { mtree_path: PathBuf, path: PathBuf, }, PathMissing { mtree_path: PathBuf, path: PathBuf, }, PathModeMismatch { mtree_path: PathBuf, mtree_mode: String, path: PathBuf, path_mode: String, }, PathNotADir { mtree_path: PathBuf, path: PathBuf, }, PathNotAFile { mtree_path: PathBuf, path: PathBuf, }, PathSizeMismatch { mtree_path: PathBuf, mtree_size: u64, path: PathBuf, path_size: u64, }, PathSymlinkMismatch { mtree_path: PathBuf, mtree_link_path: PathBuf, path: PathBuf, link_path: PathBuf, }, PathTimeMismatch { mtree_path: PathBuf, mtree_time: i64, path: PathBuf, path_time: i64, }, PathUidMismatch { mtree_path: PathBuf, mtree_uid: u32, path: PathBuf, path_uid: u32, }, ReadLink { path: PathBuf, mtree_path: PathBuf, source: Error, }, UnmatchedFileSystemPaths { paths: Vec<PathBuf>, }, UnmatchedMtreePaths { paths: Vec<PathBuf>, },
}
Expand description

The error that can occur when comparing Mtree paths with paths on a file system.

Variants§

§

AlpmCommon(Error)

Alpm-common error.

§

CreateHashDigest

Unable to create hash digest for a path.

Fields

§path: PathBuf

The path for which a hash digest can not be created.

§source: Error

The source error.

§

PathDigestMismatch

The hash digest of a path in the ALPM-MTREE data does not match that of the corresponding on-disk file.

Fields

§mtree_path: PathBuf

The path in the ALPM-MTREE data that does not have a matching path on disk.

§mtree_digest: Sha256Checksum

The size of the path according to ALPM-MTREE data.

§path: PathBuf

The on-disk path, that does not match the size of the ALPM-MTREE data.

§path_digest: Sha256Checksum

The on-disk path, that does not match the size of the ALPM-MTREE data.

§

PathGidMismatch

The GID of a path in the ALPM-MTREE metadata does not match that of the corresponding on-disk file.

Fields

§mtree_path: PathBuf

The path in the ALPM-MTREE data that has a differing GID from that of the on-disk file.

§mtree_gid: u32

The GID recorded in the ALPM-MTREE data for mtree_path.

§path: PathBuf

The on-disk path, that has a differing GID from the ALPM-MTREE data.

§path_gid: u32

The GID used for path.

§

PathMetadata

The metadata for a path can not be retrieved.

Fields

§path: PathBuf

The on-disk path for which metadata can not be retrieved.

§source: Error

The source Error.

§

PathMismatch

A path does not match what it is supposed to be.

Fields

§mtree_path: PathBuf

The path in the ALPM-MTREE data that does not have a matching path on disk.

§path: PathBuf

The on-disk path, that does not match that of the ALPM-MTREE data.

§

PathMissing

An on-disk path does not exist.

Fields

§mtree_path: PathBuf

The path in the ALPM-MTREE data that does not have a matching path on disk.

§path: PathBuf

The absolute on-disk path, that does not exist.

§

PathModeMismatch

The mode of a path in the ALPM-MTREE metadata does not match that of the corresponding on-disk file.

Fields

§mtree_path: PathBuf

The path in the ALPM-MTREE data that has a differing mode from that of the on-disk file.

§mtree_mode: String

The mode recorded in the ALPM-MTREE data for mtree_path.

§path: PathBuf

The on-disk path, that has a differing mode from that of the ALPM-MTREE data.

§path_mode: String

The mode used for path.

§

PathNotADir

An on-disk path is not a directory.

Fields

§mtree_path: PathBuf

The path in the ALPM-MTREE data requiring path to be a directory.

§path: PathBuf

The absolute on-disk path, that is not a directory.

§

PathNotAFile

An on-disk path is not a file.

Fields

§mtree_path: PathBuf

The path in the ALPM-MTREE data requiring path to be a file.

§path: PathBuf

The absolute on-disk path, that is not a file.

§

PathSizeMismatch

The size of a path in the ALPM-MTREE metadata does not match the size of the corresponding on-disk file.

Fields

§mtree_path: PathBuf

The path in the ALPM-MTREE data that does not have a matching path on disk.

§mtree_size: u64

The size of the path according to ALPM-MTREE data.

§path: PathBuf

The on-disk path, that does not match the size of the ALPM-MTREE data.

§path_size: u64

The on-disk path, that does not match the size of the ALPM-MTREE data.

§

PathSymlinkMismatch

A path does not match what it is supposed to be.

Fields

§mtree_path: PathBuf

The path in the ALPM-MTREE data that does not have a matching path on disk.

§mtree_link_path: PathBuf

The path in the ALPM-MTREE data that does not have a matching path on disk.

§path: PathBuf

The on-disk path, that does not match that of the ALPM-MTREE data.

§link_path: PathBuf

The on-disk path, that does not match that of the ALPM-MTREE data.

§

PathTimeMismatch

The time of a path in the ALPM-MTREE metadata does not match the time of the corresponding on-disk file.

Fields

§mtree_path: PathBuf

The path in the ALPM-MTREE data that does not have a matching path on disk.

§mtree_time: i64

The size of the path according to ALPM-MTREE data.

§path: PathBuf

The on-disk path, that does not match the size of the ALPM-MTREE data.

§path_time: i64

The on-disk path, that does not match the size of the ALPM-MTREE data.

§

PathUidMismatch

The UID of a path in the ALPM-MTREE metadata does not match that of the corresponding on-disk file.

Fields

§mtree_path: PathBuf

The path in the ALPM-MTREE data that does not have a matching path on disk.

§mtree_uid: u32

The UID recorded in the ALPM-MTREE data.

§path: PathBuf

The on-disk path, that does not match the size of the ALPM-MTREE data.

§path_uid: u32

The UID used for path.

Unable to read a link.

Fields

§path: PathBuf

The path for a symlink on the file system which can not be read.

§mtree_path: PathBuf

The path in the ALPM-MTREE data that does not have a matching path on disk.

§source: Error

The source error

§

UnmatchedFileSystemPaths

There are file system paths for which no matching ALPM-MTREE paths exist.

Fields

§paths: Vec<PathBuf>

The list of file system paths for which no matching ALPM-MTREE paths exist.

§

UnmatchedMtreePaths

There are ALPM-MTREE paths for which no matching file system paths exist.

Fields

§paths: Vec<PathBuf>

The list of ALPM-MTREE paths for which no matching file system paths exist.

Trait Implementations§

Source§

impl Debug for PathValidationError

Source§

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

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

impl Display for PathValidationError

Source§

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

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

impl Error for PathValidationError

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
Source§

impl From<Error> for PathValidationError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

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 = 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> ErasedDestructor for T
where T: 'static,