pub enum SnmpClientError {
Show 15 variants CreatingSocket { io_error: Error, }, Connecting { io_error: Error, }, EncodingOutgoing { message_error: SnmpMessageError, }, Sending { io_error: Error, }, ShortSend { expected: usize, sent: usize, }, Receiving { io_error: Error, }, DecodingIncoming { message_error: SnmpMessageError, }, InvalidPdu { pdu: Snmp2cPdu, }, BindingCount { expected: usize, obtained: Vec<VariableBinding>, }, UnexpectedValue { expected: ObjectIdentifier, obtained: Vec<VariableBinding>, }, PrecedingValue { previous_oid: ObjectIdentifier, obtained: Vec<VariableBinding>, }, NonIncreasingValue { previous_oid: ObjectIdentifier, next_oid: ObjectIdentifier, obtained: Vec<VariableBinding>, }, DuplicateValue { oid: ObjectIdentifier, obtained: Vec<VariableBinding>, }, FailedBinding { binding: VariableBinding, }, TimedOut,
}
Expand description

An error that can occur during SNMP communication.

Variants§

§

CreatingSocket

Fields

§io_error: Error

An error occurred while creating the socket.

§

Connecting

Fields

§io_error: Error

An error occurred while connecting the socket to a specific server.

§

EncodingOutgoing

Fields

§message_error: SnmpMessageError

An error occurred while encoding the outgoing message.

§

Sending

Fields

§io_error: Error

An error occurred while sending a message.

§

ShortSend

Fields

§expected: usize
§sent: usize

The message was truncated while being sent.

§

Receiving

Fields

§io_error: Error

An error occurred while receiving a message.

§

DecodingIncoming

Fields

§message_error: SnmpMessageError

An error occurred while decoding the incoming message.

§

InvalidPdu

Fields

The response contains an invalid Protocol Data Unit.

§

BindingCount

Fields

§expected: usize

An unexpected number of variable bindings has been received.

§

UnexpectedValue

Fields

An unexpected value has been obtained in a Get operation.

§

PrecedingValue

Fields

§previous_oid: ObjectIdentifier

A value preceding the provided previous OID has been obtained in a GetNext or GetBulk operation.

§

NonIncreasingValue

Fields

§previous_oid: ObjectIdentifier

Multiple values have been obtained and they are not in ascending order by OID.

§

DuplicateValue

More than one value has been obtained for the same OID in a GetBulk operation.

§

FailedBinding

Fields

A variable binding value signifying an error has been obtained.

§

TimedOut

The operation took longer than allowed by the timeout value.

Trait Implementations§

source§

impl Debug for SnmpClientError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for SnmpClientError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for SnmpClientError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.