Struct der::asn1::OctetString
source · pub struct OctetString { /* private fields */ }
Available on crate feature
alloc
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§
source§impl OctetString
impl OctetString
sourcepub fn into_bytes(self) -> Vec<u8>
pub fn into_bytes(self) -> Vec<u8>
Take ownership of the octet string.
Trait Implementations§
source§impl<'a> Arbitrary<'a> for OctetString
Available on crate feature arbitrary
only.
impl<'a> Arbitrary<'a> for OctetString
Available on crate feature
arbitrary
only.source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl AsRef<[u8]> for OctetString
impl AsRef<[u8]> for OctetString
source§impl Clone for OctetString
impl Clone for OctetString
source§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 moresource§impl Debug for OctetString
impl Debug for OctetString
source§impl<'a> DecodeValue<'a> for OctetString
impl<'a> DecodeValue<'a> for OctetString
source§impl EncodeValue for OctetString
impl EncodeValue for OctetString
source§impl<'a> From<&'a OctetString> for OctetStringRef<'a>
impl<'a> From<&'a OctetString> for OctetStringRef<'a>
source§fn from(octet_string: &'a OctetString) -> OctetStringRef<'a>
fn from(octet_string: &'a OctetString) -> OctetStringRef<'a>
Converts to this type from the input type.
source§impl Ord for OctetString
impl Ord for OctetString
source§fn cmp(&self, other: &OctetString) -> Ordering
fn cmp(&self, other: &OctetString) -> 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 OwnedToRef for OctetString
impl OwnedToRef for OctetString
§type Borrowed<'a> = OctetStringRef<'a>
type Borrowed<'a> = OctetStringRef<'a>
The resulting type referencing back to Self
source§fn owned_to_ref(&self) -> Self::Borrowed<'_>
fn owned_to_ref(&self) -> Self::Borrowed<'_>
Creates a new object referencing back to the self for storage
source§impl PartialEq<OctetString> for OctetString
impl PartialEq<OctetString> for OctetString
source§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 ==
.source§impl PartialOrd<OctetString> for OctetString
impl PartialOrd<OctetString> for OctetString
source§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