Pure Rust embedded-friendly implementation of the Distinguished Encoding Rules
(DER) for Abstract Syntax Notation One (ASN.1) as described in ITU X.690 with
full support for heapless no_std targets
//! Value traits
usecrate::{Decoder, Encoder, Header, Length,Result, Tagged};#[cfg(doc)]usecrate::Tag;/// Decode the value part of a Tag-Length-Value encoded field, sans the [`Tag`]
/// and [`Length`].
pubtraitDecodeValue<'a>: Sized {/// Attempt to decode this message using the provided [`Decoder`].
fndecode_value(decoder:&mutDecoder<'a>, length: Length)->Result<Self>;}/// Encode the value part of a Tag-Length-Value encoded field, sans the [`Tag`]
/// and [`Length`].
pubtraitEncodeValue{/// Get the [`Header`] used to encode this value.
fnheader(&self)->Result<Header>whereSelf: Tagged,
{Header::new(self.tag(),self.value_len()?)}/// Compute the length of this value (sans [`Tag`]+[`Length`] header) when
/// encoded as ASN.1 DER.
fnvalue_len(&self)->Result<Length>;/// Encode value (sans [`Tag`]+[`Length`] header) as ASN.1 DER using the
/// provided [`Encoder`].
fnencode_value(&self, encoder:&mutEncoder<'_>)->Result<()>;}