pub struct OctetString { /* private fields */ }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§
Trait Implementations§
Source§impl AsRef<[u8]> for OctetString
impl AsRef<[u8]> for OctetString
Source§impl Borrow<OctetStringRef> for OctetString
impl Borrow<OctetStringRef> for OctetString
Source§fn borrow(&self) -> &OctetStringRef
fn borrow(&self) -> &OctetStringRef
Immutably borrows from an owned value. Read more
Source§impl Clone for OctetString
impl Clone for OctetString
Source§fn clone(&self) -> OctetString
fn clone(&self) -> OctetString
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 &'a OctetStringRef
impl<'a> From<&'a OctetString> for &'a OctetStringRef
Source§fn from(octet_string: &'a OctetString) -> &'a OctetStringRef
fn from(octet_string: &'a OctetString) -> &'a OctetStringRef
Converts to this type from the input type.
Source§impl From<&OctetStringRef> for OctetString
impl From<&OctetStringRef> for OctetString
Source§fn from(octet_string_ref: &OctetStringRef) -> OctetString
fn from(octet_string_ref: &OctetStringRef) -> OctetString
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 (const: unstable) · 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 OctetString
impl PartialEq for OctetString
Source§fn eq(&self, other: &OctetString) -> bool
fn eq(&self, other: &OctetString) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for OctetString
impl PartialOrd for OctetString
Source§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.Source§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 Freeze for OctetString
impl RefUnwindSafe for OctetString
impl Send for OctetString
impl Sync for OctetString
impl Unpin for OctetString
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag + 'a,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag + 'a,
Source§type Error = <T as DecodeValue<'a>>::Error
type Error = <T as DecodeValue<'a>>::Error
Type returned in the event of a decoding error.
Source§fn decode<R>(reader: &mut R) -> Result<T, <T as DecodeValue<'a>>::Error>where
R: Reader<'a>,
fn decode<R>(reader: &mut R) -> Result<T, <T as DecodeValue<'a>>::Error>where
R: Reader<'a>,
Attempt to decode this TLV message using the provided decoder. Read more
Source§impl<T> Encode for T
impl<T> Encode for T
Source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this TLV object in bytes when encoded as ASN.1 DER. Read more
Source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>
Encode this TLV object to the provided byte slice, returning a sub-slice
containing the encoded message. Read more
Source§impl<T> IsConstructed for T
impl<T> IsConstructed for T
Source§const CONSTRUCTED: bool = const CONSTRUCTED: bool = T::TAG.is_constructed();
const CONSTRUCTED: bool = const CONSTRUCTED: bool = T::TAG.is_constructed();
ASN.1 constructed bit