pub enum SetTestError {
GeneralFailure,
NoAccess,
NotWritable,
WrongType,
WrongLength,
WrongEncoding,
WrongValue,
NoCreation,
InconsistentValue,
ResourceUnavailable,
InconsistentName,
}agent only.Expand description
A protocol validation failure from the SET test phase.
This type deliberately cannot represent successful validation, or failures
that only make sense after commit begins. Consequently Err from
MibHandler::test_set can never accidentally
encode noError, commitFailed, or undoFailed.
use async_snmp::{SetCommitError, SetTestResult};
let _: SetTestResult = Err(SetCommitError::Failed);Commit- and undo-only failures are likewise different types:
use async_snmp::{SetCommitError, SetTestError};
let _: SetTestError = SetCommitError::Failed;Variants§
GeneralFailure
Validation or its backing service failed without a more specific status.
Maps to genErr. Use a more specific variant whenever the failure is a
protocol validation outcome rather than an internal/backend failure.
NoAccess
Access denied by the handler’s application policy.
NotWritable
Object is inherently read-only.
WrongType
Value has the wrong ASN.1 type.
WrongLength
Value violates a length constraint.
WrongEncoding
Value encoding is invalid.
WrongValue
Value fails semantic validation.
NoCreation
The requested object or row cannot be created.
InconsistentValue
Value conflicts with other state or varbinds.
A reservation needed for the transaction is unavailable.
InconsistentName
Row or instance name is inconsistent with existing data.
Implementations§
Source§impl SetTestError
impl SetTestError
Sourcepub const fn to_error_status(self) -> ErrorStatus
pub const fn to_error_status(self) -> ErrorStatus
Convert this validation failure to its protocol response status.
Trait Implementations§
Source§impl Clone for SetTestError
impl Clone for SetTestError
Source§fn clone(&self) -> SetTestError
fn clone(&self) -> SetTestError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SetTestError
Source§impl Debug for SetTestError
impl Debug for SetTestError
impl Eq for SetTestError
Source§impl PartialEq for SetTestError
impl PartialEq for SetTestError
impl StructuralPartialEq for SetTestError
Auto Trait Implementations§
impl Freeze for SetTestError
impl RefUnwindSafe for SetTestError
impl Send for SetTestError
impl Sync for SetTestError
impl Unpin for SetTestError
impl UnsafeUnpin for SetTestError
impl UnwindSafe for SetTestError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.