Struct ed25519_dalek::pkcs8::spki::der::asn1::ContextSpecificRef
pub struct ContextSpecificRef<'a, T> {
pub tag_number: TagNumber,
pub tag_mode: TagMode,
pub value: &'a T,
}
Available on crate feature
pkcs8
only.Expand description
Context-specific field reference.
This type encodes a field which is specific to a particular context
and is identified by a TagNumber
.
Fields§
§tag_number: TagNumber
Context-specific tag number sans the leading 0b10000000
class
identifier bit and 0b100000
constructed flag.
tag_mode: TagMode
Tag mode: EXPLICIT
VS IMPLICIT
.
value: &'a T
Value of the field.
Trait Implementations§
§impl<'a, T> Clone for ContextSpecificRef<'a, T>where
T: Clone,
impl<'a, T> Clone for ContextSpecificRef<'a, T>where
T: Clone,
§fn clone(&self) -> ContextSpecificRef<'a, T>
fn clone(&self) -> ContextSpecificRef<'a, T>
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 more§impl<'a, T> Debug for ContextSpecificRef<'a, T>where
T: Debug,
impl<'a, T> Debug for ContextSpecificRef<'a, T>where
T: Debug,
§impl<'a, T> EncodeValue for ContextSpecificRef<'a, T>where
T: EncodeValue + Tagged,
impl<'a, T> EncodeValue for ContextSpecificRef<'a, T>where
T: EncodeValue + Tagged,
§impl<'a, T> Ord for ContextSpecificRef<'a, T>where
T: Ord,
impl<'a, T> Ord for ContextSpecificRef<'a, T>where
T: Ord,
§fn cmp(&self, other: &ContextSpecificRef<'a, T>) -> Ordering
fn cmp(&self, other: &ContextSpecificRef<'a, T>) -> 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
§impl<'a, T> PartialEq for ContextSpecificRef<'a, T>where
T: PartialEq,
impl<'a, T> PartialEq for ContextSpecificRef<'a, T>where
T: PartialEq,
§fn eq(&self, other: &ContextSpecificRef<'a, T>) -> bool
fn eq(&self, other: &ContextSpecificRef<'a, T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<'a, T> PartialOrd for ContextSpecificRef<'a, T>where
T: PartialOrd,
impl<'a, T> PartialOrd for ContextSpecificRef<'a, T>where
T: PartialOrd,
§fn partial_cmp(&self, other: &ContextSpecificRef<'a, T>) -> Option<Ordering>
fn partial_cmp(&self, other: &ContextSpecificRef<'a, T>) -> 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 more§impl<'a, T> Tagged for ContextSpecificRef<'a, T>where
T: Tagged,
impl<'a, T> Tagged for ContextSpecificRef<'a, T>where
T: Tagged,
impl<'a, T> Copy for ContextSpecificRef<'a, T>where
T: Copy,
impl<'a, T> Eq for ContextSpecificRef<'a, T>where
T: Eq,
impl<'a, T> StructuralPartialEq for ContextSpecificRef<'a, T>
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for ContextSpecificRef<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for ContextSpecificRef<'a, T>where
T: Sync,
impl<'a, T> Sync for ContextSpecificRef<'a, T>where
T: Sync,
impl<'a, T> Unpin for ContextSpecificRef<'a, T>
impl<'a, T> UnwindSafe for ContextSpecificRef<'a, T>where
T: RefUnwindSafe,
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
§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer
.
§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.