[][src]Enum abi_stable::library::LibraryError

pub enum LibraryError {
    OpenError {
        path: PathBuf,
        err: Box<Error>,
    },
    GetSymbolError {
        library: PathBuf,
        symbol: Vec<u8>,
        err: Box<Error>,
    },
    ParseVersionError(ParseVersionError),
    IncompatibleVersionNumber {
        library_name: &'static str,
        expected_version: VersionNumber,
        actual_version: VersionNumber,
    },
    RootModule {
        err: RootModuleError,
        module_name: &'static str,
        version: VersionStrings,
    },
    AbiInstability(RBoxError),
    InvalidAbiHeader(AbiHeader),
    InvalidCAbi {
        expected: RBoxError,
        found: RBoxError,
    },
    Many(RVec<Self>),
}

All the possible errors that could happen when loading a library, or a module.

Variants

OpenError

When a library can't be loaded, because it doesn't exist.

Fields of OpenError

path: PathBuferr: Box<Error>
GetSymbolError

When a function/static does not exist.

Fields of GetSymbolError

library: PathBufsymbol: Vec<u8>

The name of the function/static.Does not have to be utf-8.

err: Box<Error>
ParseVersionError(ParseVersionError)

The version string could not be parsed into a version number.

IncompatibleVersionNumber

The version numbers of the library was incompatible.

Fields of IncompatibleVersionNumber

library_name: &'static strexpected_version: VersionNumberactual_version: VersionNumber
RootModule

Fields of RootModule

err: RootModuleErrormodule_name: &'static strversion: VersionStrings
AbiInstability(RBoxError)

The abi is incompatible. The error is opaque,since the error always comes from the main binary (dynamic libraries can be loaded from other dynamic libraries).

InvalidAbiHeader(AbiHeader)

The type used to check that this is a compatible abi_stable is not the same.

InvalidCAbi

When Rust changes how it implements the C abi,

Fields of InvalidCAbi

expected: RBoxErrorfound: RBoxError
Many(RVec<Self>)

There could have been 0 or more errors in the function.

Trait Implementations

impl Debug for LibraryError[src]

impl Display for LibraryError[src]

impl Error for LibraryError[src]

impl From<ParseVersionError> for LibraryError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[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> GetWithMetadata for T[src]

type ForSelf = WithMetadata_<T, T>

This is always WithMetadata_<Self, Self>

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

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

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

impl<This> TransmuteElement for This where
    This: ?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.

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

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

The error type returned when the conversion fails.

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

type Type = T

The same type as Self. Read more