[][src]Enum pathrs::error::Error

pub enum Error {
    NotImplemented {
        feature: String,
        backtrace: Backtrace,
    },
    NotSupported {
        feature: String,
        backtrace: Backtrace,
    },
    InvalidArgument {
        name: String,
        description: String,
        backtrace: Backtrace,
    },
    SafetyViolation {
        description: String,
        backtrace: Backtrace,
    },
    OsError {
        operation: String,
        source: IOError,
        backtrace: Backtrace,
    },
    RawOsError {
        operation: String,
        source: SyscallError,
    },
    Wrapped {
        context: String,
        source: Box<Error>,
    },
}

The primary error type returned by libpathrs.

All public interfaces of libpathrs will return this error in Results. In order to enable or disable backtrace-generation for libpathrs Errors, modify BACKTRACES_ENABLED.

Caveats

Until Error::chain is stabilised, it will be necessary for callers to manually implement their own version of this feature.

Variants

NotImplemented

The requested feature is not yet implemented.

Fields of NotImplemented

feature: String

Feature which is not implemented.

backtrace: Backtrace

Backtrace captured at time of error.

NotSupported

The requested feature is not supported by this kernel.

Fields of NotSupported

feature: String

Feature which is not supported.

backtrace: Backtrace

Backtrace captured at time of error.

InvalidArgument

One of the provided arguments in invalid.

Fields of InvalidArgument

name: String

Name of the invalid argument.

description: String

Description of what makes the argument invalid.

backtrace: Backtrace

Backtrace captured at time of error.

SafetyViolation

libpathrs has detected some form of safety requirement violation. This might be an attempted breakout by an attacker or even a bug internal to libpathrs.

Fields of SafetyViolation

description: String

Description of safety requirement which was violated.

backtrace: Backtrace

Backtrace captured at time of error.

OsError

The requested libpathrs operation resulted in an IOError. This should be contrasted with RawOsError -- which indicates an error triggered by one of libpathrs's syscall wrappers.

Fields of OsError

operation: String

Operation which was being attempted.

source: IOError

Underlying error.

backtrace: Backtrace

Backtrace captured at time of error.

RawOsError

The requested libpathrs operation resulted in a SyscallError by one of libpathrs's syscall wrappers. This should be contrasted with OsError -- which indicates an error triggered by a Rust stdlib function.

Fields of RawOsError

operation: String

Operation which was being attempted.

source: SyscallError

Underlying syscall wrapper error.

Wrapped

Wrapped represents an Error which has some simple string-wrapping information. This is used to allow for some additional context to be added at call-sites.

Fields of Wrapped

context: String

Additional context information about the contained error.

source: Box<Error>

Underlying wrapped error.

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error where
    Self: Debug + Display
[src]

impl ErrorCompat for Error[src]

Auto Trait Implementations

impl !RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsErrorSource for T where
    T: 'static + Error
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.