pub struct OctetStringRef { /* private fields */ }Expand description
ASN.1 OCTET STRING type: borrowed form.
Octet strings represent contiguous sequences of octets, a.k.a. bytes.
This is a zero-copy reference type which borrows from the input data.
Implementations§
Trait Implementations§
Source§impl AsRef<[u8]> for OctetStringRef
impl AsRef<[u8]> for OctetStringRef
Source§impl Borrow<OctetStringRef> for OctetString
Available on crate feature alloc only.
impl Borrow<OctetStringRef> for OctetString
Available on crate feature
alloc only.Source§fn borrow(&self) -> &OctetStringRef
fn borrow(&self) -> &OctetStringRef
Immutably borrows from an owned value. Read more
Source§impl Debug for OctetStringRef
impl Debug for OctetStringRef
Source§impl<'a> DecodeValue<'a> for &'a OctetStringRef
impl<'a> DecodeValue<'a> for &'a OctetStringRef
Source§impl EncodeValue for &OctetStringRef
impl EncodeValue for &OctetStringRef
Source§impl<'a> From<&'a OctetString> for &'a OctetStringRef
Available on crate feature alloc only.
impl<'a> From<&'a OctetString> for &'a OctetStringRef
Available on crate feature
alloc only.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<'a> From<&'a OctetStringRef> for &'a [u8]
impl<'a> From<&'a OctetStringRef> for &'a [u8]
Source§impl<'a> From<&'a OctetStringRef> for AnyRef<'a>
impl<'a> From<&'a OctetStringRef> for AnyRef<'a>
Source§fn from(octet_string: &'a OctetStringRef) -> AnyRef<'a>
fn from(octet_string: &'a OctetStringRef) -> AnyRef<'a>
Converts to this type from the input type.
Source§impl From<&OctetStringRef> for Bytes
Available on crate feature bytes only.
impl From<&OctetStringRef> for Bytes
Available on crate feature
bytes only.Source§fn from(octet_string: &OctetStringRef) -> Bytes
fn from(octet_string: &OctetStringRef) -> Bytes
Converts to this type from the input type.
Source§impl From<&OctetStringRef> for OctetString
Available on crate feature alloc only.
impl From<&OctetStringRef> for OctetString
Available on crate feature
alloc only.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 Hash for OctetStringRef
impl Hash for OctetStringRef
Source§impl Ord for OctetStringRef
impl Ord for OctetStringRef
Source§impl PartialEq for OctetStringRef
impl PartialEq for OctetStringRef
Source§impl PartialOrd for OctetStringRef
impl PartialOrd for OctetStringRef
Source§impl ToOwned for OctetStringRef
Available on crate feature alloc only.
impl ToOwned for OctetStringRef
Available on crate feature
alloc only.Source§type Owned = OctetString
type Owned = OctetString
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> OctetString
fn to_owned(&self) -> OctetString
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
Source§impl<'a> TryFrom<&&'a [u8]> for &'a OctetStringRef
Hack for simplifying the custom derive use case.
impl<'a> TryFrom<&&'a [u8]> for &'a OctetStringRef
Hack for simplifying the custom derive use case.
Source§impl<'a> TryFrom<&'a [u8]> for &'a OctetStringRef
impl<'a> TryFrom<&'a [u8]> for &'a OctetStringRef
Source§impl<'__der: 'a, 'a> TryFrom<&'__der Any> for &'a OctetStringRef
Available on crate feature alloc only.
impl<'__der: 'a, 'a> TryFrom<&'__der Any> for &'a OctetStringRef
Available on crate feature
alloc only.Source§impl<'a> TryFrom<&'a Cow<'a, [u8]>> for &'a OctetStringRef
Available on crate feature alloc only.
impl<'a> TryFrom<&'a Cow<'a, [u8]>> for &'a OctetStringRef
Available on crate feature
alloc only.Source§impl<const N: usize> TryFrom<&OctetStringRef> for Vec<u8, N>
Available on crate feature heapless only.
impl<const N: usize> TryFrom<&OctetStringRef> for Vec<u8, N>
Available on crate feature
heapless only.Source§impl<'a> TryFrom<&'a Vec<u8>> for &'a OctetStringRef
Available on crate feature alloc only.Hack for simplifying the custom derive use case.
impl<'a> TryFrom<&'a Vec<u8>> for &'a OctetStringRef
Available on crate feature
alloc only.Hack for simplifying the custom derive use case.
Source§impl<'a, const N: usize> TryFrom<&'a VecInner<u8, usize, VecStorageInner<[MaybeUninit<u8>; N]>>> for &'a OctetStringRef
Available on crate feature heapless only.
impl<'a, const N: usize> TryFrom<&'a VecInner<u8, usize, VecStorageInner<[MaybeUninit<u8>; N]>>> for &'a OctetStringRef
Available on crate feature
heapless only.Source§impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for &'a OctetStringRef
impl<'__der: 'a, 'a> TryFrom<AnyRef<'__der>> for &'a OctetStringRef
impl Eq for OctetStringRef
impl StructuralPartialEq for OctetStringRef
Auto Trait Implementations§
impl Freeze for OctetStringRef
impl RefUnwindSafe for OctetStringRef
impl Send for OctetStringRef
impl !Sized for OctetStringRef
impl Sync for OctetStringRef
impl Unpin for OctetStringRef
impl UnwindSafe for OctetStringRef
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> 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