Trait der::asn1::Sequence

source ·
pub trait Sequence<'a>: Decodable<'a> {
    // Required method
    fn fields<F, T>(&self, f: F) -> Result<T>
       where F: FnOnce(&[&dyn Encodable]) -> Result<T>;
}
Expand description

ASN.1 SEQUENCE trait.

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

Required Methods§

source

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

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

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.

Object Safety§

This trait is not object safe.

Implementors§