pub struct ObjectIdentifier(/* private fields */);Expand description
An OBJECT IDENTIFIER: its arcs.
use oxirush_aper::ObjectIdentifier;
let identifier = ObjectIdentifier::new(vec![0, 4, 0, 1989, 0])?;
assert_eq!(identifier.arcs(), [0, 4, 0, 1989, 0]);
assert_eq!(identifier.to_string(), "0.4.0.1989.0");
// The first arc is 0, 1 or 2, and the second is below 40 under 0 and 1
assert!(ObjectIdentifier::new(vec![3, 1]).is_err());
assert!(ObjectIdentifier::new(vec![1, 40]).is_err());Implementations§
Source§impl ObjectIdentifier
impl ObjectIdentifier
Trait Implementations§
Source§impl Clone for ObjectIdentifier
impl Clone for ObjectIdentifier
Source§impl Debug for ObjectIdentifier
impl Debug for ObjectIdentifier
Source§impl Display for ObjectIdentifier
The arcs in decimal, with a full stop between them: 0.4.0.1989.0.
impl Display for ObjectIdentifier
The arcs in decimal, with a full stop between them: 0.4.0.1989.0.
impl Eq for ObjectIdentifier
Source§impl FromStr for ObjectIdentifier
The identifier that text writes: its arcs in decimal, with a full stop between
them.
impl FromStr for ObjectIdentifier
The identifier that text writes: its arcs in decimal, with a full stop between
them.
Source§impl Hash for ObjectIdentifier
impl Hash for ObjectIdentifier
Source§impl Ord for ObjectIdentifier
impl Ord for ObjectIdentifier
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ObjectIdentifier
impl PartialEq for ObjectIdentifier
Source§impl PartialOrd for ObjectIdentifier
impl PartialOrd for ObjectIdentifier
impl StructuralPartialEq for ObjectIdentifier
Auto Trait Implementations§
impl Freeze for ObjectIdentifier
impl RefUnwindSafe for ObjectIdentifier
impl Send for ObjectIdentifier
impl Sync for ObjectIdentifier
impl Unpin for ObjectIdentifier
impl UnsafeUnpin for ObjectIdentifier
impl UnwindSafe for ObjectIdentifier
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