Struct yasna::models::TaggedDerValue
source · pub struct TaggedDerValue { /* private fields */ }
Expand description
Container for a tag and arbitrary DER value.
When obtained by BERReader::read_tagged_der
in DER mode,
the reader verifies that the payload is actually valid DER.
When constructed from bytes, the caller is responsible for
providing valid DER.
Implementations§
source§impl TaggedDerValue
impl TaggedDerValue
sourcepub fn from_octetstring(bytes: Vec<u8>) -> Self
pub fn from_octetstring(bytes: Vec<u8>) -> Self
Constructs a new TaggedDerValue
as an octet string
sourcepub fn from_tag_and_bytes(tag: Tag, bytes: Vec<u8>) -> Self
pub fn from_tag_and_bytes(tag: Tag, bytes: Vec<u8>) -> Self
Constructs a new TaggedDerValue
from its tag and content
sourcepub fn from_tag_pc_and_bytes(tag: Tag, pcbit: PCBit, bytes: Vec<u8>) -> Self
pub fn from_tag_pc_and_bytes(tag: Tag, pcbit: PCBit, bytes: Vec<u8>) -> Self
Constructs a new TaggedDerValue
from its tag,
primitive/constructed bit, and content
Trait Implementations§
source§impl BERDecodable for TaggedDerValue
impl BERDecodable for TaggedDerValue
source§fn decode_ber(reader: BERReader<'_, '_>) -> ASN1Result<Self>
fn decode_ber(reader: BERReader<'_, '_>) -> ASN1Result<Self>
source§impl Clone for TaggedDerValue
impl Clone for TaggedDerValue
source§fn clone(&self) -> TaggedDerValue
fn clone(&self) -> TaggedDerValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TaggedDerValue
impl Debug for TaggedDerValue
source§impl Hash for TaggedDerValue
impl Hash for TaggedDerValue
source§impl Ord for TaggedDerValue
impl Ord for TaggedDerValue
source§fn cmp(&self, other: &TaggedDerValue) -> Ordering
fn cmp(&self, other: &TaggedDerValue) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for TaggedDerValue
impl PartialEq for TaggedDerValue
source§fn eq(&self, other: &TaggedDerValue) -> bool
fn eq(&self, other: &TaggedDerValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TaggedDerValue
impl PartialOrd for TaggedDerValue
source§fn partial_cmp(&self, other: &TaggedDerValue) -> Option<Ordering>
fn partial_cmp(&self, other: &TaggedDerValue) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for TaggedDerValue
impl StructuralPartialEq for TaggedDerValue
Auto Trait Implementations§
impl Freeze for TaggedDerValue
impl RefUnwindSafe for TaggedDerValue
impl Send for TaggedDerValue
impl Sync for TaggedDerValue
impl Unpin for TaggedDerValue
impl UnwindSafe for TaggedDerValue
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more