pub enum RejectReason {
ExceedsMaxHops,
DestinationIsSelfOrUpstream,
KnownRouteReplay,
KnownRouteNoNewerEvidence,
DeadRouteReplay,
EqualEvidenceIncumbentStillWorking,
StaleEvidence,
}Variants§
ExceedsMaxHops
DestinationIsSelfOrUpstream
A destination this node answers for (our own, or an upstream app’s) is delivered locally, never routed, so no path may be learned for it.
This must be a rejection because neighbors rebroadcast our own announces back at us; accepting the echo would store a route for our own address pointing out an interface.
RNS folds this into should_add’s first condition alongside the hops cap.
KnownRouteReplay
KnownRouteNoNewerEvidence
DeadRouteReplay
EqualEvidenceIncumbentStillWorking
StaleEvidence
Longer hops, fresh route, emission strictly older than stored, i.e., stale.
Python’s if/elif chain has no else arm here, so should_add keeps its initial False; we surface it explicitly.
Trait Implementations§
Source§impl Clone for RejectReason
impl Clone for RejectReason
Source§fn clone(&self) -> RejectReason
fn clone(&self) -> RejectReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RejectReason
Source§impl Debug for RejectReason
impl Debug for RejectReason
impl Eq for RejectReason
Source§impl PartialEq for RejectReason
impl PartialEq for RejectReason
impl StructuralPartialEq for RejectReason
Auto Trait Implementations§
impl Freeze for RejectReason
impl RefUnwindSafe for RejectReason
impl Send for RejectReason
impl Sync for RejectReason
impl Unpin for RejectReason
impl UnsafeUnpin for RejectReason
impl UnwindSafe for RejectReason
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