[][src]Struct tokio_vsock::VsockListener

pub struct VsockListener { /* fields omitted */ }

An I/O object representing a Virtio socket listening for incoming connections.

Implementations

impl VsockListener[src]

pub fn bind(addr: &SockAddr) -> Result<Self>[src]

Create a new Virtio socket listener associated with this event loop.

pub fn poll_accept(
    &mut self,
    cx: &mut Context
) -> Poll<Result<(VsockStream, SockAddr)>>
[src]

Attempt to accept a connection and create a new connected socket if successful.

pub fn poll_accept_std(
    &mut self,
    cx: &mut Context
) -> Poll<Result<(VsockStream, SockAddr)>>
[src]

Attempt to accept a connection and create a new connected socket if successful.

pub fn from_std(listener: VsockListener) -> Result<Self>[src]

Create a new Virtio socket listener from a blocking listener.

pub fn local_addr(&self) -> Result<SockAddr>[src]

The local address that this listener is bound to.

pub fn incoming(self) -> Incoming[src]

Consumes this listener, returning a stream of the sockets this listener accepts.

Trait Implementations

impl AsRawFd for VsockListener[src]

impl Debug for VsockListener[src]

impl FromRawFd for VsockListener[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.