Trait rasn::Encode[][src]

pub trait Encode: AsnType {
    fn encode_with_tag<E: Encoder>(
        &self,
        encoder: &mut E,
        tag: Tag
    ) -> Result<(), E::Error>; fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), E::Error> { ... } }

A data type that can be encoded to a ASN.1 data format.

Required methods

fn encode_with_tag<E: Encoder>(
    &self,
    encoder: &mut E,
    tag: Tag
) -> Result<(), E::Error>
[src]

Encode this value implicitly tagged with tag into the given Decoder.

Loading content...

Provided methods

fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), E::Error>[src]

Encodes self’s data into the given Encoder.

Note for implementors You typically do not need to implement this. The default implementation will call Encode::encode_with_tag with your types associated AsnType::TAG. You should only ever need to implement this if you have a type that cannot be implicitly tagged, such as a CHOICE type.

Loading content...

Implementations on Foreign Types

impl<E: Encode> Encode for Option<E>[src]

impl Encode for BTreeMap<Tag, Open>[src]

Loading content...

Implementors

impl Encode for &str[src]

impl Encode for ()[src]

impl Encode for Open[src]

impl Encode for Integer[src]

impl Encode for ObjectIdentifier[src]

impl Encode for OctetString[src]

impl Encode for Utf8String[src]

impl Encode for BitString[src]

impl Encode for GeneralizedTime[src]

impl Encode for UtcTime[src]

impl Encode for bool[src]

impl Encode for i8[src]

impl Encode for i16[src]

impl Encode for i32[src]

impl Encode for i64[src]

impl Encode for i128[src]

impl Encode for isize[src]

impl Encode for u8[src]

impl Encode for u16[src]

impl Encode for u32[src]

impl Encode for u64[src]

impl Encode for u128[src]

impl Encode for usize[src]

impl<E: Encode> Encode for SequenceOf<E>[src]

impl<T: AsnType, V: Encode> Encode for Explicit<T, V>[src]

impl<T: AsnType, V: Encode> Encode for Implicit<T, V>[src]

impl<T: Encode> Encode for InstanceOf<T>[src]

Loading content...