pub enum Notification {
TrapV1 {
community: Bytes,
trap: TrapV1Pdu,
},
TrapV2c {
community: Bytes,
uptime: u32,
trap_oid: Oid,
varbinds: Vec<VarBind>,
request_id: i32,
},
TrapV3 {
username: Bytes,
context_engine_id: Bytes,
context_name: Bytes,
uptime: u32,
trap_oid: Oid,
varbinds: Vec<VarBind>,
request_id: i32,
},
InformV2c {
community: Bytes,
uptime: u32,
trap_oid: Oid,
varbinds: Vec<VarBind>,
request_id: i32,
},
InformV3 {
username: Bytes,
context_engine_id: Bytes,
context_name: Bytes,
uptime: u32,
trap_oid: Oid,
varbinds: Vec<VarBind>,
request_id: i32,
},
}Expand description
Received SNMP notification.
This enum represents all types of SNMP notifications that can be received:
- SNMPv1 Trap (different PDU structure)
- SNMPv2c/v3 Trap (standard PDU with sysUpTime.0 and snmpTrapOID.0)
- InformRequest (confirmed notification, response will be sent automatically)
Variants§
TrapV1
SNMPv1 Trap with unique PDU structure.
TrapV2c
SNMPv2c Trap (unconfirmed notification).
Fields
TrapV3
SNMPv3 Trap (unconfirmed notification).
Fields
InformV2c
InformRequest (confirmed notification) - v2c.
A response is automatically sent when this notification is received.
Fields
InformV3
InformRequest (confirmed notification) - v3.
A response is automatically sent when this notification is received.
Implementations§
Source§impl Notification
impl Notification
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
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 moreAuto Trait Implementations§
impl !Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnsafeUnpin for Notification
impl UnwindSafe for Notification
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more