pub enum StorageType {
Other = 1,
Volatile = 2,
NonVolatile = 3,
Permanent = 4,
ReadOnly = 5,
}Expand description
RFC 2579 StorageType textual convention.
Describes how an SNMP row’s data is stored and persisted.
§Persistence Levels
| Type | Survives Reboot | Writable |
|---|---|---|
| other | undefined | varies |
| volatile | no | yes |
| nonVolatile | yes | yes |
| permanent | yes | limited |
| readOnly | yes | no |
§Example
use async_snmp::{Value, StorageType};
// Reading a StorageType column
let value = Value::Integer(3);
assert_eq!(value.as_storage_type(), Some(StorageType::NonVolatile));
// Creating a value to write
let storage: Value = StorageType::Volatile.into();
assert_eq!(storage, Value::Integer(2));Variants§
Other = 1
Implementation-specific storage.
Volatile = 2
Lost on reboot; can be modified.
NonVolatile = 3
Survives reboot; can be modified.
Permanent = 4
Survives reboot; limited modifications allowed.
ReadOnly = 5
Survives reboot; cannot be modified.
Implementations§
Trait Implementations§
Source§impl Clone for StorageType
impl Clone for StorageType
Source§fn clone(&self) -> StorageType
fn clone(&self) -> StorageType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StorageType
impl Debug for StorageType
Source§impl Display for StorageType
impl Display for StorageType
Source§impl From<StorageType> for Value
impl From<StorageType> for Value
Source§fn from(storage: StorageType) -> Self
fn from(storage: StorageType) -> Self
Converts to this type from the input type.
Source§impl Hash for StorageType
impl Hash for StorageType
Source§impl PartialEq for StorageType
impl PartialEq for StorageType
impl Copy for StorageType
impl Eq for StorageType
impl StructuralPartialEq for StorageType
Auto Trait Implementations§
impl Freeze for StorageType
impl RefUnwindSafe for StorageType
impl Send for StorageType
impl Sync for StorageType
impl Unpin for StorageType
impl UnwindSafe for StorageType
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