virtual_net

Trait 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