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§
- Assert
CsArgs - Arguments for
assert_correct_storage
- Enum
Info - Contains miscelaneous information about an enum.
- NonExhaustive
- A generic type for all ffi-safe non-exhaustive enums.
- Unwrap
Enum Error - 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§
- Deserialize
Enum - Describes how a nonexhaustive enum is deserialized.
- GetEnum
Info - Describes the discriminant of an enum,and its valid values.
- GetV
Table - Gets the vtable of
NonExhaustive<Self,S,I>
. - NonExhaustive
Marker - Queries the marker type which describes the layout of this enum,
for use in
NonExhaustive
’sStableAbi
impl. - NonExhaustive
Shared Ops - Used to abstract over the reference-ness of
NonExhaustive
insideUnwrapEnumError
. - Serialize
Enum - Describes how some enum is serialized.
- Valid
Discriminant - Marker trait for types that abi_stable supports as enum discriminants.
Functions§
- assert_
correct_ default_ storage - Asserts that the size and alignment of an enum are valid for its default storage.
- assert_
correct_ storage - Asserts that the size and alignment of an enum aree valid for this storage.
Type Aliases§
- NonExhaustive
For - The type of a
NonExhaustive
wrapping the enumE
, usingE
’s default storage and interface. - NonExhaustiveWI
- The type of a
NonExhaustive<>
wrapping the enum E, using theE
’s default storage and a custom interface. - NonExhaustiveWS
- The type of a
NonExhaustive<>
wrapping the enum E, using a custom storage and theE
’s default interface.