Struct const_oid::ObjectIdentifierRef
source · pub struct ObjectIdentifierRef { /* private fields */ }
Expand description
OID reference type: wrapper for the BER serialization.
Implementations§
source§impl ObjectIdentifierRef
impl ObjectIdentifierRef
sourcepub fn from_bytes(ber: &[u8]) -> Result<&Self>
pub fn from_bytes(ber: &[u8]) -> Result<&Self>
Create an ObjectIdentifierRef
, validating that the provided byte slice contains a valid
BER/DER encoding.
sourcepub const fn as_bytes(&self) -> &[u8] ⓘ
pub const fn as_bytes(&self) -> &[u8] ⓘ
Get the BER/DER serialization of this OID as bytes.
Note that this encoding omits the ASN.1 tag/length, and only contains the value portion of the encoded OID.
sourcepub fn arc(&self, index: usize) -> Option<Arc>
pub fn arc(&self, index: usize) -> Option<Arc>
Return the arc with the given index, if it exists.
sourcepub fn arcs(&self) -> Arcs<'_> ⓘ
pub fn arcs(&self) -> Arcs<'_> ⓘ
Iterate over the arcs (a.k.a. nodes) of an ObjectIdentifier
.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Get the length of this ObjectIdentifier
in arcs.
Trait Implementations§
source§impl AsRef<[u8]> for ObjectIdentifierRef
impl AsRef<[u8]> for ObjectIdentifierRef
source§impl<const MAX_SIZE: usize> AsRef<ObjectIdentifierRef> for ObjectIdentifier<MAX_SIZE>
impl<const MAX_SIZE: usize> AsRef<ObjectIdentifierRef> for ObjectIdentifier<MAX_SIZE>
source§fn as_ref(&self) -> &ObjectIdentifierRef
fn as_ref(&self) -> &ObjectIdentifierRef
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<const MAX_SIZE: usize> Borrow<ObjectIdentifierRef> for ObjectIdentifier<MAX_SIZE>
impl<const MAX_SIZE: usize> Borrow<ObjectIdentifierRef> for ObjectIdentifier<MAX_SIZE>
source§fn borrow(&self) -> &ObjectIdentifierRef
fn borrow(&self) -> &ObjectIdentifierRef
Immutably borrows from an owned value. Read more
source§impl Debug for ObjectIdentifierRef
impl Debug for ObjectIdentifierRef
source§impl Display for ObjectIdentifierRef
impl Display for ObjectIdentifierRef
source§impl<'a, const MAX_SIZE: usize> From<&'a ObjectIdentifier<MAX_SIZE>> for &'a ObjectIdentifierRef
impl<'a, const MAX_SIZE: usize> From<&'a ObjectIdentifier<MAX_SIZE>> for &'a ObjectIdentifierRef
source§fn from(oid: &'a ObjectIdentifier<MAX_SIZE>) -> &'a ObjectIdentifierRef
fn from(oid: &'a ObjectIdentifier<MAX_SIZE>) -> &'a ObjectIdentifierRef
Converts to this type from the input type.
source§impl Hash for ObjectIdentifierRef
impl Hash for ObjectIdentifierRef
source§impl Ord for ObjectIdentifierRef
impl Ord for ObjectIdentifierRef
source§impl<const MAX_SIZE: usize> PartialEq<ObjectIdentifier<MAX_SIZE>> for ObjectIdentifierRef
impl<const MAX_SIZE: usize> PartialEq<ObjectIdentifier<MAX_SIZE>> for ObjectIdentifierRef
source§fn eq(&self, other: &ObjectIdentifier<MAX_SIZE>) -> bool
fn eq(&self, other: &ObjectIdentifier<MAX_SIZE>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for ObjectIdentifierRef
impl PartialEq for ObjectIdentifierRef
source§fn eq(&self, other: &ObjectIdentifierRef) -> bool
fn eq(&self, other: &ObjectIdentifierRef) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ObjectIdentifierRef
impl PartialOrd for ObjectIdentifierRef
source§fn partial_cmp(&self, other: &ObjectIdentifierRef) -> Option<Ordering>
fn partial_cmp(&self, other: &ObjectIdentifierRef) -> 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