Skip to main content

BerDecoderOwned

Trait BerDecoderOwned 

Source
pub trait BerDecoderOwned: SpecCombinator {
    type Owned: DeepView<V = Self::T>;

    // Required method
    exec fn decode_owned(&self, bytes: Vec<u8>) -> r : Result<Self::Owned, ParseError>;
}
Expand description

Executable bridge from owned BER contents octets to owned values.

Required Associated Types§

Source

type Owned: DeepView<V = Self::T>

Required Methods§

Source

exec fn decode_owned(&self, bytes: Vec<u8>) -> r : Result<Self::Owned, ParseError>

ensures
({
    let expected = match self.spec_parse(bytes.deep_view()) {
        Some((_, value)) => Some(value),
        None => None,
    };
    &&& r is Ok <==> expected is Some
    &&& r is Err <==> expected is None
    &&& r matches Ok(value) ==> expected == Some(value.deep_view())

}),

Implementors§

Source§

impl BerDecoderOwned for BmpStringFmt

Available on crate feature alloc only.
Source§

impl BerDecoderOwned for Ia5StringFmt

Available on crate feature alloc only.
Source§

impl BerDecoderOwned for PrintableStringFmt

Available on crate feature alloc only.
Source§

impl BerDecoderOwned for TeletexStringFmt

Available on crate feature alloc only.
Source§

impl BerDecoderOwned for UniversalStringFmt

Available on crate feature alloc only.
Source§

impl BerDecoderOwned for Utf8StringFmt

Available on crate feature alloc only.
Source§

impl BerDecoderOwned for NumericStringFmt

Available on crate feature alloc only.