pub enum RtrPdu {
SerialNotify(RtrSerialNotify),
SerialQuery(RtrSerialQuery),
ResetQuery(RtrResetQuery),
CacheResponse(RtrCacheResponse),
IPv4Prefix(RtrIPv4Prefix),
IPv6Prefix(RtrIPv6Prefix),
EndOfData(RtrEndOfData),
CacheReset(RtrCacheReset),
RouterKey(RtrRouterKey),
ErrorReport(RtrErrorReport),
}Expand description
Unified RTR PDU Enum
This enum represents any RTR Protocol Data Unit and is useful for generic PDU handling when reading from a stream.
Variants§
SerialNotify(RtrSerialNotify)
Serial Notify (Type 0)
SerialQuery(RtrSerialQuery)
Serial Query (Type 1)
ResetQuery(RtrResetQuery)
Reset Query (Type 2)
CacheResponse(RtrCacheResponse)
Cache Response (Type 3)
IPv4Prefix(RtrIPv4Prefix)
IPv4 Prefix (Type 4)
IPv6Prefix(RtrIPv6Prefix)
IPv6 Prefix (Type 6)
EndOfData(RtrEndOfData)
End of Data (Type 7)
CacheReset(RtrCacheReset)
Cache Reset (Type 8)
RouterKey(RtrRouterKey)
Router Key (Type 9, v1 only)
ErrorReport(RtrErrorReport)
Error Report (Type 10)
Implementations§
Source§impl RtrPdu
impl RtrPdu
Sourcepub fn pdu_type(&self) -> RtrPduType
pub fn pdu_type(&self) -> RtrPduType
Get the PDU type
Sourcepub fn version(&self) -> RtrProtocolVersion
pub fn version(&self) -> RtrProtocolVersion
Get the protocol version
Trait Implementations§
Source§impl From<RtrCacheReset> for RtrPdu
impl From<RtrCacheReset> for RtrPdu
Source§fn from(pdu: RtrCacheReset) -> Self
fn from(pdu: RtrCacheReset) -> Self
Converts to this type from the input type.
Source§impl From<RtrCacheResponse> for RtrPdu
impl From<RtrCacheResponse> for RtrPdu
Source§fn from(pdu: RtrCacheResponse) -> Self
fn from(pdu: RtrCacheResponse) -> Self
Converts to this type from the input type.
Source§impl From<RtrEndOfData> for RtrPdu
impl From<RtrEndOfData> for RtrPdu
Source§fn from(pdu: RtrEndOfData) -> Self
fn from(pdu: RtrEndOfData) -> Self
Converts to this type from the input type.
Source§impl From<RtrErrorReport> for RtrPdu
impl From<RtrErrorReport> for RtrPdu
Source§fn from(pdu: RtrErrorReport) -> Self
fn from(pdu: RtrErrorReport) -> Self
Converts to this type from the input type.
Source§impl From<RtrIPv4Prefix> for RtrPdu
impl From<RtrIPv4Prefix> for RtrPdu
Source§fn from(pdu: RtrIPv4Prefix) -> Self
fn from(pdu: RtrIPv4Prefix) -> Self
Converts to this type from the input type.
Source§impl From<RtrIPv6Prefix> for RtrPdu
impl From<RtrIPv6Prefix> for RtrPdu
Source§fn from(pdu: RtrIPv6Prefix) -> Self
fn from(pdu: RtrIPv6Prefix) -> Self
Converts to this type from the input type.
Source§impl From<RtrResetQuery> for RtrPdu
impl From<RtrResetQuery> for RtrPdu
Source§fn from(pdu: RtrResetQuery) -> Self
fn from(pdu: RtrResetQuery) -> Self
Converts to this type from the input type.
Source§impl From<RtrRouterKey> for RtrPdu
impl From<RtrRouterKey> for RtrPdu
Source§fn from(pdu: RtrRouterKey) -> Self
fn from(pdu: RtrRouterKey) -> Self
Converts to this type from the input type.
Source§impl From<RtrSerialNotify> for RtrPdu
impl From<RtrSerialNotify> for RtrPdu
Source§fn from(pdu: RtrSerialNotify) -> Self
fn from(pdu: RtrSerialNotify) -> Self
Converts to this type from the input type.
Source§impl From<RtrSerialQuery> for RtrPdu
impl From<RtrSerialQuery> for RtrPdu
Source§fn from(pdu: RtrSerialQuery) -> Self
fn from(pdu: RtrSerialQuery) -> Self
Converts to this type from the input type.
impl Eq for RtrPdu
impl StructuralPartialEq for RtrPdu
Auto Trait Implementations§
impl Freeze for RtrPdu
impl RefUnwindSafe for RtrPdu
impl Send for RtrPdu
impl Sync for RtrPdu
impl Unpin for RtrPdu
impl UnwindSafe for RtrPdu
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<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
Compare self to
key and return true if they are equal.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