pub struct NullTransport { /* private fields */ }Expand description
Null transport (for testing)
Discards all packets, never receives anything.
Implementations§
Trait Implementations§
Source§impl Default for NullTransport
impl Default for NullTransport
Source§impl Transport for NullTransport
impl Transport for NullTransport
Source§fn send(&mut self, data: &[u8], _dest: &Locator) -> Result<usize>
fn send(&mut self, data: &[u8], _dest: &Locator) -> Result<usize>
Send packet to destination Read more
Source§fn recv(&mut self, _buf: &mut [u8]) -> Result<(usize, Locator)>
fn recv(&mut self, _buf: &mut [u8]) -> Result<(usize, Locator)>
Receive packet (blocking) Read more
Source§fn try_recv(&mut self, _buf: &mut [u8]) -> Result<(usize, Locator)>
fn try_recv(&mut self, _buf: &mut [u8]) -> Result<(usize, Locator)>
Receive packet (non-blocking) Read more
Source§fn local_locator(&self) -> Locator
fn local_locator(&self) -> Locator
Get local locator (own address)
Auto Trait Implementations§
impl Freeze for NullTransport
impl RefUnwindSafe for NullTransport
impl Send for NullTransport
impl Sync for NullTransport
impl Unpin for NullTransport
impl UnsafeUnpin for NullTransport
impl UnwindSafe for NullTransport
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