Struct ed25519_dalek::pkcs8::spki::der::asn1::OctetString
pub struct OctetString { /* private fields */ }
Available on crate feature
pkcs8
only.Expand description
ASN.1 OCTET STRING
type: owned form..
Octet strings represent contiguous sequences of octets, a.k.a. bytes.
This type provides the same functionality as OctetStringRef
but owns
the backing data.
Implementations§
§impl OctetString
impl OctetString
pub fn into_bytes(self) -> Vec<u8>
pub fn into_bytes(self) -> Vec<u8>
Take ownership of the octet string.
Trait Implementations§
§impl AsRef<[u8]> for OctetString
impl AsRef<[u8]> for OctetString
§impl Clone for OctetString
impl Clone for OctetString
§fn clone(&self) -> OctetString
fn clone(&self) -> OctetString
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 Debug for OctetString
impl Debug for OctetString
§impl<'a> DecodeValue<'a> for OctetString
impl<'a> DecodeValue<'a> for OctetString
§fn decode_value<R>(reader: &mut R, header: Header) -> Result<OctetString, Error>where
R: Reader<'a>,
fn decode_value<R>(reader: &mut R, header: Header) -> Result<OctetString, Error>where
R: Reader<'a>,
Attempt to decode this message using the provided
Reader
.§impl EncodeValue for OctetString
impl EncodeValue for OctetString
§impl<'a> From<&'a OctetString> for OctetStringRef<'a>
impl<'a> From<&'a OctetString> for OctetStringRef<'a>
§fn from(octet_string: &'a OctetString) -> OctetStringRef<'a>
fn from(octet_string: &'a OctetString) -> OctetStringRef<'a>
Converts to this type from the input type.
§impl Ord for OctetString
impl Ord for OctetString
§impl OwnedToRef for OctetString
impl OwnedToRef for OctetString
§type Borrowed<'a> = OctetStringRef<'a>
type Borrowed<'a> = OctetStringRef<'a>
The resulting type referencing back to Self
§fn owned_to_ref(&self) -> <OctetString as OwnedToRef>::Borrowed<'_>
fn owned_to_ref(&self) -> <OctetString as OwnedToRef>::Borrowed<'_>
Creates a new object referencing back to the self for storage
§impl PartialEq for OctetString
impl PartialEq for OctetString
§fn eq(&self, other: &OctetString) -> bool
fn eq(&self, other: &OctetString) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for OctetString
impl PartialOrd for OctetString
§fn partial_cmp(&self, other: &OctetString) -> Option<Ordering>
fn partial_cmp(&self, other: &OctetString) -> 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<'__der> TryFrom<&'__der Any> for OctetString
Available on crate feature alloc
only.
impl<'__der> TryFrom<&'__der Any> for OctetString
Available on crate feature
alloc
only.§impl<'__der> TryFrom<AnyRef<'__der>> for OctetString
impl<'__der> TryFrom<AnyRef<'__der>> for OctetString
impl Eq for OctetString
impl StructuralPartialEq for OctetString
Auto Trait Implementations§
impl RefUnwindSafe for OctetString
impl Send for OctetString
impl Sync for OctetString
impl Unpin for OctetString
impl UnwindSafe for OctetString
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<'a, T> Choice<'a> for T
impl<'a, T> Choice<'a> for T
§fn can_decode(tag: Tag) -> bool
fn can_decode(tag: Tag) -> bool
Is the provided
Tag
decodable as a variant of this CHOICE
?§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
§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.