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

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>),
}
Expand description

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.

Tuple Fields of ParseVersionError

0: ParseVersionError
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).

Tuple Fields of AbiInstability

0: RBoxError
InvalidAbiHeader(AbiHeader)

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

Tuple Fields of InvalidAbiHeader

0: AbiHeader
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.

Tuple Fields of Many

0: RVec<Self>

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

This is always WithMetadata_<Self, Self>

Performs the conversion.

Gets a reference to a field, determined by offset. Read more

Gets a muatble reference to a field, determined by offset. Read more

Gets a const pointer to a field, the field is determined by offset. Read more

Gets a mutable pointer to a field, determined by offset. Read more

Replaces a field (determined by offset) with value, returning the previous value of the field. Read more

Swaps a field (determined by offset) with the same field in right. Read more

Gets a copy of a field (determined by offset). The field is determined by offset. Read more

Replaces a field (determined by offset) with value, returning the previous value of the field. Read more

Swaps a field (determined by offset) with the same field in right. Read more

Gets a copy of a field (determined by offset). The field is determined by offset. Read more

Compares the address of self with the address of other. Read more

Emulates the pipeline operator, allowing method syntax in more places. Read more

The same as piped except that the function takes &Self Useful for functions that take &Self instead of Self. Read more

The same as piped, except that the function takes &mut Self. Useful for functions that take &mut Self instead of Self. Read more

Mutates self using a closure taking self by mutable reference, passing it along the method chain. Read more

Observes the value of self, passing it along unmodified. Useful in long method chains. Read more

Performs a conversion with Into. using the turbofish .into_::<_>() syntax. Read more

Performs a reference to reference conversion with AsRef, using the turbofish .as_ref_::<_>() syntax. Read more

Performs a mutable reference to mutable reference conversion with AsMut, using the turbofish .as_mut_::<_>() syntax. Read more

Drops self using method notation. Alternative to std::mem::drop. Read more

Converts the given value to a String. Read more

Transmutes the element type of this pointer.. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

This is always Self.

Converts a value back to the original type.

Converts a reference back to the original type.

Converts a mutable reference back to the original type.

This is supported on crate feature alloc only.

Converts a box back to the original type.

This is supported on crate feature alloc only.

Converts an Arc back to the original type. Read more

This is supported on crate feature alloc only.

Converts an Rc back to the original type. Read more

Converts a value back to the original type.

Converts a reference back to the original type.

Converts a mutable reference back to the original type.

This is supported on crate feature alloc only.

Converts a box back to the original type.

This is supported on crate feature alloc only.

Converts an Arc back to the original type.

This is supported on crate feature alloc only.

Converts an Rc back to the original type.