[][src]Trait der::Message

pub trait Message<'a>: Decodable<'a> {
    pub fn fields<F, T>(&self, f: F) -> Result<T>
    where
        F: FnOnce(&[&dyn Encodable]) -> Result<T>
; }

Messages encoded as an ASN.1 SEQUENCE.

This wraps up a common pattern for ASN.1 encoding.

Types which impl this trait receive blanket impls for the Decodable, Encodable, and Tagged traits.

Required methods

pub fn fields<F, T>(&self, f: F) -> Result<T> where
    F: FnOnce(&[&dyn Encodable]) -> Result<T>, 
[src]

Call the provided function with a slice of Encodable trait objects representing the fields of this message.

This method uses a callback because structs with fields which aren't directly Encodable may need to construct temporary values from their fields prior to encoding.

Loading content...

Implementors

Loading content...