FfiEnum

Trait FfiEnum 

Source
pub trait FfiEnum: Copy + Eq {
    type Enum: TryFrom<Self, Error = Error> + Into<Self>;
    type Repr: Copy + From<Self> + Into<Self>;

    const UNKNOWN: Self;
}
Expand description

Types generated from ffi_enum implement this trait which provides essential type and constant information.

Required Associated Constants§

Source

const UNKNOWN: Self

A sample of an unknown values

Note that a ffi_enum accepts any value of the representation type, so some_value != FfiEnum::UNKNOWN does not indicate that some_value is known

Required Associated Types§

Source

type Enum: TryFrom<Self, Error = Error> + Into<Self>

The rusty enum type of the ffi_enum type

Source

type Repr: Copy + From<Self> + Into<Self>

The representation type of the ffi_enum type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§