Struct tor_rtmock::net::MockUdpSocket
source · #[non_exhaustive]pub struct MockUdpSocket { /* private fields */ }Expand description
A very poor imitation of a UDP socket
Trait Implementations§
source§impl Debug for MockUdpSocket
impl Debug for MockUdpSocket
source§impl UdpSocket for MockUdpSocket
impl UdpSocket for MockUdpSocket
source§fn recv<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = IoResult<(usize, SocketAddr)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn recv<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = IoResult<(usize, SocketAddr)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Wait for an incoming datagram; return it along its address.
source§fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
buf: &'life1 [u8],
target: &'life2 SocketAddr
) -> Pin<Box<dyn Future<Output = IoResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
buf: &'life1 [u8],
target: &'life2 SocketAddr
) -> Pin<Box<dyn Future<Output = IoResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send a datagram to the provided address.
source§fn local_addr(&self) -> IoResult<SocketAddr>
fn local_addr(&self) -> IoResult<SocketAddr>
Return the local address that this socket is bound to.
Auto Trait Implementations§
impl RefUnwindSafe for MockUdpSocket
impl Send for MockUdpSocket
impl Sync for MockUdpSocket
impl Unpin for MockUdpSocket
impl UnwindSafe for MockUdpSocket
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