Skip to main content

Enumerated

Trait Enumerated 

Source
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§

Source

type Representation: Decode + Clone + PartialEq + Debug

Wire representation of the enumerators.

Required Methods§

Source

fn to_representation(&self) -> Self::Representation

The wire value of this enumerator.

Source

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".

Implementors§

Source§

impl Enumerated for HLAASCIIchar

Source§

impl Enumerated for HLAboolean

Source§

impl Enumerated for HLAbyte

Source§

impl Enumerated for HLAfloat32BE

Source§

impl Enumerated for HLAfloat32LE

Source§

impl Enumerated for HLAfloat64BE

Source§

impl Enumerated for HLAfloat64LE

Source§

impl Enumerated for HLAinteger16BE

Source§

impl Enumerated for HLAinteger16LE

Source§

impl Enumerated for HLAinteger32BE

Source§

impl Enumerated for HLAinteger32LE

Source§

impl Enumerated for HLAinteger64BE

Source§

impl Enumerated for HLAinteger64LE

Source§

impl Enumerated for HLAoctet

Source§

impl Enumerated for HLAoctetPairBE

Source§

impl Enumerated for HLAoctetPairLE

Source§

impl Enumerated for HLAunicodeChar

Source§

impl Enumerated for HLAunsignedInteger8

Source§

impl Enumerated for HLAunsignedInteger16BE

Source§

impl Enumerated for HLAunsignedInteger16LE

Source§

impl Enumerated for HLAunsignedInteger32BE

Source§

impl Enumerated for HLAunsignedInteger32LE

Source§

impl Enumerated for HLAunsignedInteger64BE

Source§

impl Enumerated for HLAunsignedInteger64LE