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
sourceimpl 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
sourceimpl BERDecodable for TaggedDerValue
impl BERDecodable for TaggedDerValue
sourcefn decode_ber(reader: BERReader<'_, '_>) -> ASN1Result<Self>
fn decode_ber(reader: BERReader<'_, '_>) -> ASN1Result<Self>
sourceimpl Clone for TaggedDerValue
impl Clone for TaggedDerValue
sourcefn clone(&self) -> TaggedDerValue
fn clone(&self) -> TaggedDerValue
Returns a copy of the value. Read more
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for TaggedDerValue
impl Debug for TaggedDerValue
sourceimpl Hash for TaggedDerValue
impl Hash for TaggedDerValue
sourcefn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [
Hasher
]. Read more1.3.0fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
Feeds a slice of this type into the given [
Hasher
]. Read moresourceimpl Ord for TaggedDerValue
impl Ord for TaggedDerValue
sourceimpl PartialEq<TaggedDerValue> for TaggedDerValue
impl PartialEq<TaggedDerValue> for TaggedDerValue
sourcefn eq(&self, other: &TaggedDerValue) -> bool
fn eq(&self, other: &TaggedDerValue) -> bool
sourceimpl PartialOrd<TaggedDerValue> for TaggedDerValue
impl PartialOrd<TaggedDerValue> for TaggedDerValue
sourcefn partial_cmp(&self, other: &TaggedDerValue) -> Option<Ordering>
fn partial_cmp(&self, other: &TaggedDerValue) -> Option<Ordering>
1.0.0const fn lt(&self, other: &Rhs) -> bool
const fn lt(&self, other: &Rhs) -> bool
1.0.0const fn le(&self, other: &Rhs) -> bool
const 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 more1.0.0const fn gt(&self, other: &Rhs) -> bool
const fn gt(&self, other: &Rhs) -> bool
impl Eq for TaggedDerValue
impl StructuralEq for TaggedDerValue
impl StructuralPartialEq for TaggedDerValue
Auto Trait Implementations
impl RefUnwindSafe for TaggedDerValue
impl Send for TaggedDerValue
impl Sync for TaggedDerValue
impl Unpin for TaggedDerValue
impl UnwindSafe for TaggedDerValue
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more