Trait toad_msg::opt::OptionMap

source ·
pub trait OptionMapwhere
    Self: Map<OptNumber, Self::OptValues>,{
    type OptValue: Array<Item = u8> + AppendCopy<u8>;
    type OptValues: Array<Item = OptValue<Self::OptValue>>;

    // Provided methods
    fn opts(self) -> OptIter<Self, Self::IntoIter>  { ... }
    fn opt_refs(
        &self
    ) -> OptRefIter<'_, Self, Iter<'_, OptNumber, Self::OptValues>>  { ... }
}
Expand description

Generalization of HashMap<OptNumber, OptValue<Vec<u8>>>

Required Associated Types§

source

type OptValue: Array<Item = u8> + AppendCopy<u8>

Byte array for option values

source

type OptValues: Array<Item = OptValue<Self::OptValue>>

One or more values for a given number.

Note that not all options are repeatable.

Provided Methods§

source

fn opts(self) -> OptIter<Self, Self::IntoIter>

Iterate over the map, yielding raw option structures

source

fn opt_refs(&self) -> OptRefIter<'_, Self, Iter<'_, OptNumber, Self::OptValues>>

Iterate over the map, yielding raw option structures

Implementations on Foreign Types§

source§

impl<const MAX_OPTS: usize, const MAX_INSTANCES: usize, const MAX_BYTES_PER_INSTANCE: usize> OptionMap for ArrayVec<[(OptNumber, ArrayVec<[OptValue<ArrayVec<[u8; MAX_BYTES_PER_INSTANCE]>>; MAX_INSTANCES]>); N]>

source§

impl OptionMap for BTreeMap<OptNumber, Vec<OptValue<Vec<u8>>>>

Implementors§