Struct asn1_cereal::tag::Tag
[−]
[src]
pub struct Tag { pub class: Class, pub tagnum: TagNum, pub constructed: bool, }
A struct containing the information from an ASN.1 tag, which represents an ASN.1 element.
Fields
class: Class
The class flag in the ASN.1 tag.
tagnum: TagNum
The tag number in the ASN.1 tag.
constructed: bool
The constructed flag in the ASN.1 tag, indicating whether this element contains another ASN.1 element.
Methods
impl Tag
[src]
fn is_structured(&self) -> bool
Returns true when this element is a SEQUENCE (OF), or SET (OF).
fn read_tag<I: Iterator<Item=Result<u8>>>(bytes: &mut I) -> Result<Self, DecodeError>
Given an iterator over a byte stream, read and return a Tag struct.
fn write_tag<W: Write>(self, writer: &mut W) -> Result<(), EncodeError>
Write this ASN.1 Tag struct to the given writer.
Trait Implementations
impl PartialEq for Tag
[src]
fn eq(&self, __arg_0: &Tag) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Tag) -> bool
This method tests for !=
.
impl Debug for Tag
[src]
impl Clone for Tag
[src]
fn clone(&self) -> Tag
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more