Struct eagre_asn1::der::intermediate::Intermediate
[−]
[src]
pub struct Intermediate { pub class: Class, pub content_type: ContentType, pub tag: u32, pub content: Vec<u8>, }
Intermediate Type
Intermediate type necessary for tagging, etc.
Fields
class | Class of this encoded object |
content_type | Content Type of this encoded object |
tag | Tag of this encoded object |
content | Content octets |
Methods
impl Intermediate
[src]
fn new(class: Class, ct: ContentType, tag: u32) -> Intermediate
[−]
Create new Intermediate with empty content octets
fn with_content(self, content: Vec<u8>) -> Intermediate
[−]
Add a content like using a builder
let i = Intermediate::new(Class::Application, ContentType::Primitive, 2).with_content(vec!(0x00));
fn set_content(&mut self, content: Vec<u8>)
[−]
Set content octets
fn encode(&self, w: &mut Write) -> Result<()>
[−]
Encode this Intermediate
fn encode_explicit(&self, tag: u32, class: Class, w: &mut Write) -> Result<()>
[−]
Encode this Intermediate using explicit tagging
fn encode_implicit(&self, tag: u32, class: Class, w: &mut Write) -> Result<()>
[−]
Encode this Intermediate using implicit tagging
fn decode(r: &mut Read) -> Result<Intermediate>
[−]
Decode an Intermediate
fn decode_explicit(r: &mut Read) -> Result<(u32, Class, Intermediate)>
[−]
Decode an Intermediate using explicit tagging
fn decode_implicit(tag: u32, class: Class, r: &mut Read) -> Result<(u32, Class, Intermediate)>
[−]
Decode an Intermediate using implicit tagging
Trait Implementations
Derived Implementations
impl Debug for Intermediate
[src]
impl Clone for Intermediate
[src]
fn clone(&self) -> Intermediate
[−]
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