Struct asn1_cereal::ber::serial::prim::OctetString
[−]
[src]
pub struct OctetString(_);
A Rust wrapper for OCTET STRING.
To access the internal element, call a.0
.
(Use this instead of Vec
Trait Implementations
impl Asn1Info for OctetString
[src]
fn asn1_tag() -> Option<Tag>
Get the ASN.1 tag (if defined) for this Rust type. Some types don't have a tag, eg. CHOICE.
fn asn1_type() -> Type
Get the ASN.1 type for this Rust type.
impl BerSerialize for OctetString
[src]
fn serialize_value<E: BerEncRules, W: Write>(
&self,
_: E,
writer: &mut W
) -> Result<(), EncodeError>
&self,
_: E,
writer: &mut W
) -> Result<(), EncodeError>
Serialise a value into ASN.1 data, without a tag (implicit tagging).
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), EncodeError>
Serialize a value into ASN.1 data as DER.
fn serialize_enc<E: BerEncRules, W: Write>(
&self,
e: E,
writer: &mut W
) -> Result<(), EncodeError>
&self,
e: E,
writer: &mut W
) -> Result<(), EncodeError>
Serialize a value into ASN.1 data using a specific set of encoding rules.
fn _serialize_enc<E: BerEncRules, W: Write>(
&self,
e: E,
writer: &mut W
) -> Option<Result<(), EncodeError>>
&self,
e: E,
writer: &mut W
) -> Option<Result<(), EncodeError>>
An empty method that is called first by serialize_enc
to allow custom handling, without losing normal serialization behaviour. Read more
impl BerDeserialize for OctetString
[src]
fn deserialize_value<E: BerEncRules, I: Iterator<Item = Result<u8>>>(
_: E,
reader: &mut I,
len: Len
) -> Result<Self, DecodeError>
_: E,
reader: &mut I,
len: Len
) -> Result<Self, DecodeError>
Deserialize an ASN.1 value from a BER stream, after having the tag and length decoded. Read more
fn deserialize<I: Iterator<Item = Result<u8>>>(
reader: &mut I
) -> Result<Self, DecodeError>
reader: &mut I
) -> Result<Self, DecodeError>
Deserialize ASN.1 data into a Rust value, accepting any valid BER.
fn deserialize_enc<E: BerEncRules, I: Iterator<Item = Result<u8>>>(
e: E,
reader: &mut I
) -> Result<Self, DecodeError>
e: E,
reader: &mut I
) -> Result<Self, DecodeError>
Deserialize ASN.1 data into a Rust value, using a specific set of encoding rules.
fn deserialize_with_tag<E: BerEncRules, I: Iterator<Item = Result<u8>>>(
e: E,
reader: &mut I,
tag: Tag,
len: Len
) -> Result<Self, DecodeError>
e: E,
reader: &mut I,
tag: Tag,
len: Len
) -> Result<Self, DecodeError>
Deserialize ASN.1 data into a Rust value, using a specific set of encoding rules, and also providing the decoded tag and length. Read more
fn _deserialize_with_tag<E: BerEncRules, I: Iterator<Item = Result<u8>>>(
e: E,
reader: &mut I,
tag: Tag,
len: Len
) -> Option<Result<Self, DecodeError>>
e: E,
reader: &mut I,
tag: Tag,
len: Len
) -> Option<Result<Self, DecodeError>>
An empty method that is called first by deserialize_with_tag
to allow custom handling, without losing normal deserialization behaviour. Read more