[][src]Enum snmp_mp::VarValue

pub enum VarValue {
    Int(i32),
    String(Vec<u8>),
    ObjectId(ObjectIdent),
    IpAddress([u8; 4]),
    Counter(u32),
    UnsignedInt(u32),
    TimeTicks(u32),
    Opaque(Vec<u8>),
    BigCounter(u64),
    Unspecified,
    NoSuchObject,
    NoSuchInstance,
    EndOfMibView,
}

Represents a variable binding value.

Examples

use snmp_mp::VarValue;

let var_value = VarValue::Int(1);

Variants

Int(i32)

The Integer32 type represents integer-valued information between -2^31 and 2^31-1 inclusive (-2_147_483_648 to 2_147_483_647 decimal).

String(Vec<u8>)

The OCTET STRING type represents arbitrary binary or textual data.

ObjectId(ObjectIdent)

The OBJECT IDENTIFIER type represents administratively assigned names.

IpAddress([u8; 4])

The IpAddress type represents a 32-bit internet address. It is represented as an OCTET STRING of length 4, in network byte-order.

Counter(u32)

The Counter32 type represents a non-negative integer which monotonically increases until it reaches a maximum value of 2^32-1 (4_294_967_295 decimal), when it wraps around and starts increasing again from zero.

UnsignedInt(u32)

The Unsigned32 type represents integer-valued information between 0 and 2^32-1 inclusive (0 to 4_294_967_295 decimal).

TimeTicks(u32)

The TimeTicks type represents a non-negative integer which represents the time, modulo 2^32 (4_294_967_296 decimal), in hundredths of a second between two epochs.

Opaque(Vec<u8>)

The Opaque type is provided solely for backward-compatibility.

BigCounter(u64)

The Counter64 type represents a non-negative integer which monotonically increases until it reaches a maximum value of 2^64-1 (18_446_744_073_709_551_615 decimal), when it wraps around and starts increasing again from zero.

Unspecified

Some PDUs (e.g., the GetRequest-PDU) are concerned only with the name of a variable and not its value. In this case, the value portion of the variable binding is ignored by the receiving SNMP entity. The UnSpecified value is defined for use as the value portion of such bindings.

NoSuchObject

If a variable binding's name does not have an object identifier prefix which exactly matches any variable, then its value is set to NoSuchObject.

NoSuchInstance

If a variable binding's name does not matches an existing instance, then its value is set to NoSuchInstance.

EndOfMibView

EndOfMibView signifies the end of the data in the requested view.

Trait Implementations

impl Clone for VarValue[src]

impl Debug for VarValue[src]

impl Default for VarValue[src]

impl Eq for VarValue[src]

impl Hash for VarValue[src]

impl PartialEq<VarValue> for VarValue[src]

impl StructuralEq for VarValue[src]

impl StructuralPartialEq for VarValue[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.