[][src]Trait der::Encodable

pub trait Encodable {
    pub fn encoded_len(&self) -> Result<Length>;
pub fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>; pub fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]> { ... }
pub fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length> { ... }
pub fn to_vec(&self) -> Result<Vec<u8>> { ... } }

Encoding trait.

Required methods

pub fn encoded_len(&self) -> Result<Length>[src]

Compute the length of this value in bytes when encoded as ASN.1 DER.

pub fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>[src]

Encode this value as ASN.1 DER using the provided Encoder.

Loading content...

Provided methods

pub fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>[src]

Encode this value to the provided byte slice, returning a sub-slice containing the encoded message.

pub fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length>[src]

This is supported on crate feature alloc only.

Encode this message as ASN.1 DER, appending it to the provided byte vector.

pub fn to_vec(&self) -> Result<Vec<u8>>[src]

This is supported on crate feature alloc only.

Serialize this message as a byte vector.

Loading content...

Implementations on Foreign Types

impl Encodable for bool[src]

impl Encodable for i8[src]

impl<T> Encodable for Option<T> where
    T: Encodable
[src]

Loading content...

Implementors

impl Encodable for Tag[src]

impl Encodable for Length[src]

impl Encodable for Null[src]

impl Encodable for ObjectIdentifier[src]

impl<'a> Encodable for Sequence<'a>[src]

impl<'a> Encodable for Any<'a>[src]

impl<'a> Encodable for BitString<'a>[src]

impl<'a> Encodable for OctetString<'a>[src]

impl<'a> Encodable for RawInteger<'a>[src]

impl<'a, M> Encodable for M where
    M: Message<'a>, 
[src]

Loading content...