Skip to main content

MapDecode

Trait MapDecode 

Source
pub trait MapDecode: Sized {
    // Required methods
    fn cbor_map_keys() -> &'static [i64];
    fn decode_map<'a, E: MapEntryAccess<'a>>(
        entries: &mut E,
    ) -> Result<Self, Error>;
}
Available on crate feature cbor only.
Expand description

Direct map-entry decoding for derive-generated map-mode structs. Implementations consume claimed keys from entries.

Required Methods§

Source

fn cbor_map_keys() -> &'static [i64]

Returns the map keys this type consumes, sorted by cbor_key_cmp.

Source

fn decode_map<'a, E: MapEntryAccess<'a>>(entries: &mut E) -> Result<Self, Error>

Builds the value from the entries it claims, leaving the rest in place.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl MapDecode for Audience

Available on crate feature cwt only.
Source§

impl MapDecode for BootCount

Available on crate feature cwt only.
Source§

impl MapDecode for BootSeed

Available on crate feature cwt only.
Source§

impl MapDecode for DebugStatus

Available on crate feature cwt only.
Source§

impl MapDecode for EmptyHeader

Available on crate feature cose only.
Source§

impl MapDecode for EncProtectedHeader

Available on crate feature cose only.
Source§

impl MapDecode for EncapKeyHeader

Available on crate feature cose only.
Source§

impl MapDecode for Expiration

Available on crate feature cwt only.
Source§

impl MapDecode for HwModel

Available on crate feature cwt only.
Source§

impl MapDecode for HwVersion

Available on crate feature cwt only.
Source§

impl MapDecode for IntendedUse

Available on crate feature cwt only.
Source§

impl MapDecode for IssuedAt

Available on crate feature cwt only.
Source§

impl MapDecode for Issuer

Available on crate feature cwt only.
Source§

impl MapDecode for NotBefore

Available on crate feature cwt only.
Source§

impl MapDecode for OemBoot

Available on crate feature cwt only.
Source§

impl MapDecode for Oemid

Available on crate feature cwt only.
Source§

impl MapDecode for SigProtectedHeader

Available on crate feature cose only.
Source§

impl MapDecode for Subject

Available on crate feature cwt only.
Source§

impl MapDecode for SwName

Available on crate feature cwt only.
Source§

impl MapDecode for SwVersion

Available on crate feature cwt only.
Source§

impl MapDecode for TokenId

Available on crate feature cwt only.
Source§

impl MapDecode for Ueid

Available on crate feature cwt only.
Source§

impl MapDecode for Uptime

Available on crate feature cwt only.
Source§

impl<T: ConfirmKey> MapDecode for Confirm<T>

Available on crate feature cwt only.