Trait virtual_net::VirtualIoSource

source ·
pub trait VirtualIoSource:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn remove_handler(&mut self);
    fn poll_read_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<usize>>;
    fn poll_write_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<usize>>;
}
Expand description

Represents an IO source

Required Methods§

source

fn remove_handler(&mut self)

Removes a previously registered waker using a token

source

fn poll_read_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<usize>>

Polls the source to see if there is data waiting

source

fn poll_write_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<usize>>

Polls the source to see if data can be sent

Implementors§

source§

impl VirtualIoSource for CompositeTcpListener

source§

impl VirtualIoSource for LocalTcpListener

Available on crate feature host-net only.
source§

impl VirtualIoSource for LocalTcpStream

Available on crate feature host-net only.
source§

impl VirtualIoSource for LocalUdpSocket

Available on crate feature host-net only.
source§

impl VirtualIoSource for LoopbackTcpListener

source§

impl VirtualIoSource for TcpSocketHalf