pub struct NullEngine;Expand description
No-op implementation that returns false/None for everything. Useful for testing hooks in isolation.
Trait Implementations§
Source§impl EngineAccess for NullEngine
impl EngineAccess for NullEngine
fn has_path(&self, _dest: &[u8; 16]) -> bool
fn hops_to(&self, _dest: &[u8; 16]) -> Option<u8>
fn next_hop(&self, _dest: &[u8; 16]) -> Option<[u8; 16]>
fn is_blackholed(&self, _identity: &[u8; 16]) -> bool
fn interface_name(&self, _id: u64) -> Option<String>
fn interface_mode(&self, _id: u64) -> Option<u8>
fn identity_hash(&self) -> Option<[u8; 16]>
Auto Trait Implementations§
impl Freeze for NullEngine
impl RefUnwindSafe for NullEngine
impl Send for NullEngine
impl Sync for NullEngine
impl Unpin for NullEngine
impl UnsafeUnpin for NullEngine
impl UnwindSafe for NullEngine
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> 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