Trait rasn::enc::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> { ... } }
Expand description
A data type that can be encoded to a ASN.1 data format.
Required methods
Provided methods
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.