Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 14 variants DatabaseCreationNotEmpty { path: PathBuf, }, DatabaseHasNoTransaction { path: PathBuf, }, DatabaseHasLockedTransactionAlready { path: PathBuf, lock_file: PathBuf, uuid: Uuid, }, DatabaseIsLocked { path: PathBuf, lock_file: PathBuf, }, DatabaseIsNotADirectory { path: PathBuf, }, DatabaseFailedExclusiveLockFile { path: PathBuf, source: TryLockError, }, DatabaseWrongPermissions { path: PathBuf, permissions: u32, }, EntryComponentIsNotAFile { path: PathBuf, }, EntryComponentNameMismatch { entry_name: String, component_entry_name: String, }, EntryExists { name: EntryName, }, EntryDoesNotExist { name: EntryName, }, EntryIsNotADirectory { path: PathBuf, }, TransactionDataDirIsNotADirectory { path: PathBuf, }, TransactionTemporaryDataErrors { path: PathBuf, uuid: Uuid, errors: Vec<String>, },
}
Expand description

The error that can occur when accessing or writing an alpm-db.

Variants§

§

DatabaseCreationNotEmpty

Encountered a non-empty directory when attempting to create a new alpm-db.

Fields

§path: PathBuf

The path of the database directory, that is not empty.

§

DatabaseHasNoTransaction

An alpm-db has no transaction.

Fields

§path: PathBuf

The path of the database.

§

DatabaseHasLockedTransactionAlready

An alpm-db has a transaction and a write lock already.

Fields

§path: PathBuf

The path of the database.

§lock_file: PathBuf

The path of the lock file for the database.

§uuid: Uuid

The UUID of the transaction.

§

DatabaseIsLocked

An alpm-db is locked.

Fields

§path: PathBuf

The path of the database, that is locked.

§lock_file: PathBuf

The path of lock file for the database.

§

DatabaseIsNotADirectory

An alpm-db root path is not a directory.

Fields

§path: PathBuf

The root path of the database, that is not a directory.

§

DatabaseFailedExclusiveLockFile

A file lock for the alpm-db lock file cannot be created.

Fields

§path: PathBuf

The path of the database lock file that cannot be locked.

§source: TryLockError

The error source.

§

DatabaseWrongPermissions

The permissions for the root directory of an alpm-db differ from the defaults.

Fields

§path: PathBuf

The path of the database, that has wrong permissions.

§permissions: u32

The permissions, that do not align with the defaults.

§

EntryComponentIsNotAFile

A component (desc, files, install or mtree) in an alpm-db entry is not a file.

Fields

§path: PathBuf

The path of the entry component, that is not a file.

§

EntryComponentNameMismatch

The EntryName of an alpm-db entry and its [alpm-db-desc] component do not match.

Fields

§entry_name: String

The entry name of the entry.

§component_entry_name: String

The entry name of the entry component.

§

EntryExists

An entry of an alpm-db exists already.

Fields

§name: EntryName

The name of the entry, that exists already.

§

EntryDoesNotExist

An entry of an alpm-db does not exist.

Fields

§name: EntryName

The name of the entry, that does not exist.

§

EntryIsNotADirectory

An alpm-db entry path is not a directory.

Fields

§path: PathBuf

The path of the database entry, that is not a directory.

§

TransactionDataDirIsNotADirectory

An alpm-db transaction data directory path is not a directory.

Fields

§path: PathBuf

The root path of the database, that is not a directory.

§

TransactionTemporaryDataErrors

One or more errors occurred while preparing the temporary data for an alpm-db transaction.

Fields

§path: PathBuf

The root path of the database.

§uuid: Uuid

The transaction UUID.

§errors: Vec<String>

The string representation of the errors, that occurred.

Trait Implementations§

Source§

impl Debug for Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error

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 Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

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.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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 = !

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.