pub trait Enumerated: Sized {
type Representation: Decode + Clone + PartialEq + Debug;
// Required methods
fn to_representation(&self) -> Self::Representation;
fn from_representation(
representation: &Self::Representation,
) -> Option<Self>;
}Expand description
A datatype usable as the discriminant of a variant record: an enumerated datatype, or a basic representation used directly.
The representation is what travels on the wire. HLAextendableVariantRecord decoders read it first so
that enumerators added by other FOM modules can be skipped instead of being an error.
Required Associated Types§
Required Methods§
Sourcefn to_representation(&self) -> Self::Representation
fn to_representation(&self) -> Self::Representation
The wire value of this enumerator.
Sourcefn from_representation(representation: &Self::Representation) -> Option<Self>
fn from_representation(representation: &Self::Representation) -> Option<Self>
The enumerator with this wire value, if there is one.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".