[−][src]Struct snmp_mp::ObjectIdent
Represents an object identifier.
For SNMP the expectation is that there are at most 128 sub-identifiers in a value, and each
sub-identifier has a maximum value of 4_294_967_295
. These limits are not enforced by
ObjectIdent
.
Examples
use snmp_mp::ObjectIdent; let sys_descr_oid = [1, 3, 6, 1, 2, 1, 1, 1]; let sys_descr = ObjectIdent::from_slice(&sys_descr_oid); assert_eq!(sys_descr.components(), &sys_descr_oid);
Implementations
impl ObjectIdent
[src]
pub fn new(components: Vec<u64>) -> Self
[src]
Constructs a new ObjectIdent
from a Vec<u64>
.
Examples
let sys_descr_oid = vec![1, 3, 6, 1, 2, 1, 1, 1]; let sys_descr = ObjectIdent::new(sys_descr_oid.clone()); assert_eq!(sys_descr.components(), &sys_descr_oid[..]);
pub fn from_slice(components: &[u64]) -> Self
[src]
Constructs a new ObjectIdent
from a slice.
Examples
let sys_descr_oid = [1, 3, 6, 1, 2, 1, 1, 1]; let sys_descr = ObjectIdent::from_slice(&sys_descr_oid); assert_eq!(sys_descr.components(), &sys_descr_oid);
pub fn components(&self) -> &[u64]
[src]
Returns the components of this ObjectIdent
.
Examples
let sys_descr_oid = [1, 3, 6, 1, 2, 1, 1, 1]; let sys_descr = ObjectIdent::from_slice(&sys_descr_oid); assert_eq!(sys_descr.components(), &sys_descr_oid);
Trait Implementations
impl Clone for ObjectIdent
[src]
fn clone(&self) -> ObjectIdent
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ObjectIdent
[src]
impl Display for ObjectIdent
[src]
impl Eq for ObjectIdent
[src]
impl From<Vec<u64>> for ObjectIdent
[src]
impl FromStr for ObjectIdent
[src]
type Err = ParseOidError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Hash for ObjectIdent
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for ObjectIdent
[src]
fn cmp(&self, other: &ObjectIdent) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<ObjectIdent> for ObjectIdent
[src]
fn eq(&self, other: &ObjectIdent) -> bool
[src]
fn ne(&self, other: &ObjectIdent) -> bool
[src]
impl PartialOrd<ObjectIdent> for ObjectIdent
[src]
fn partial_cmp(&self, other: &ObjectIdent) -> Option<Ordering>
[src]
fn lt(&self, other: &ObjectIdent) -> bool
[src]
fn le(&self, other: &ObjectIdent) -> bool
[src]
fn gt(&self, other: &ObjectIdent) -> bool
[src]
fn ge(&self, other: &ObjectIdent) -> bool
[src]
impl StructuralEq for ObjectIdent
[src]
impl StructuralPartialEq for ObjectIdent
[src]
Auto Trait Implementations
impl RefUnwindSafe for ObjectIdent
impl Send for ObjectIdent
impl Sync for ObjectIdent
impl Unpin for ObjectIdent
impl UnwindSafe for ObjectIdent
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,