Module abi_stable::nonexhaustive_enum[][src]

Expand description

Contains types and traits for nonexhaustive enums.

The most important type here is NonExhaustive, which allows passing an enum which used the #[derive(StableAbi)] #[sabi(kind(WithNonExhaustive(...)))] attributes through ffi.

Structs

A struct storing the discriminant and EnumInfo of some enum.

Contains miscelaneous information about an enum.

A generic type for all ffi-safe non-exhaustive enums.

An error for a situation where a NonExhaustive<> could not be unwrapped into the enum because the discriminant wasn’t valid in this context (likely because it is from a newer version of the library).

Traits

Describes how a nonexhaustive enum is deserialized.

Describes the discriminant of an enum,and its valid values.

Gets the type whose type layout is used to represent this enum in NonExhaustive<>.

Gets the vtable of NonExhaustive<Self,S,I>.

Used to abstract over the reference-ness of NonExhaustive<> inside UnwrapEnumError.

Describes how some enum is serialized.

Marker trait for types that abi_stable supports as enum discriminants.

Functions

Asserts that the size and alignment of an enum are valid for its default storage.

Type Definitions

The type of a NonExhaustive<> wrapping the enum E, using the E’s default storage and interface.

The type of a NonExhaustive<> wrapping the enum E, using the E’s default storage and a custom interface.

The type of a NonExhaustive<> wrapping the enum E, using a custom storage and the E’s default interface.