pub trait Sequence<'a>: Decode<'a> {
    fn fields<F, T>(&self, f: F) -> Result<T, Error>
    where
        F: FnOnce(&[&dyn Encode]) -> Result<T, Error>
; }
Available on crate feature pkcs8 only.
Expand description

ASN.1 SEQUENCE trait.

Types which impl this trait receive blanket impls for the Decode, Encode, and FixedTag traits.

Required Methods§

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

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

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

Implementors§

source§

impl<'a> Sequence<'a> for PrivateKeyInfo<'a>

§

impl<'a> Sequence<'a> for AlgorithmIdentifier<'a>

§

impl<'a> Sequence<'a> for SubjectPublicKeyInfo<'a>