der::asn1

Trait Sequence

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

ASN.1 SEQUENCE trait.

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

Required Methods§

Source

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

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§