Struct mio::NonBlock [] [src]

pub struct NonBlock<T> {
    // some fields omitted
}

Methods

impl NonBlock<TcpSocket>

fn listen(self, backlog: usize) -> Result<NonBlock<TcpListener>>

fn connect(self, addr: &SocketAddr) -> Result<(NonBlock<TcpStream>, bool)>

impl NonBlock<TcpListener>

fn accept(&self) -> Result<Option<NonBlock<TcpStream>>>

Accepts a new TcpStream.

Returns a Ok(None) when the socket WOULDBLOCK, this means the stream will be ready at a later point.

impl NonBlock<UdpSocket>

fn bind(&self, addr: &SocketAddr) -> Result<()>

fn send_to<B: Buf>(&self, buf: &mut B, target: &SocketAddr) -> Result<Option<()>>

fn recv_from<B: MutBuf>(&self, buf: &mut B) -> Result<Option<SocketAddr>>

impl NonBlock<UnixSocket>

fn connect<P: AsRef<Path> + ?Sized>(self, addr: &P) -> Result<(NonBlock<UnixStream>, bool)>

fn listen(self, backlog: usize) -> Result<NonBlock<UnixListener>>

impl NonBlock<UnixListener>

fn accept(&self) -> Result<Option<NonBlock<UnixStream>>>

impl<T> NonBlock<T>

fn new(val: T) -> NonBlock<T>

fn unwrap(self) -> T

impl NonBlock<TcpSocket>

fn listen(self, backlog: usize) -> Result<NonBlock<TcpListener>>

fn connect(self, addr: &SocketAddr) -> Result<(NonBlock<TcpStream>, bool)>

impl NonBlock<TcpListener>

fn accept(&self) -> Result<Option<NonBlock<TcpStream>>>

Accepts a new TcpStream.

Returns a Ok(None) when the socket WOULDBLOCK, this means the stream will be ready at a later point.

impl NonBlock<UdpSocket>

fn bind(&self, addr: &SocketAddr) -> Result<()>

fn send_to<B: Buf>(&self, buf: &mut B, target: &SocketAddr) -> Result<Option<()>>

fn recv_from<B: MutBuf>(&self, buf: &mut B) -> Result<Option<SocketAddr>>

impl NonBlock<UnixSocket>

fn connect<P: AsRef<Path> + ?Sized>(self, addr: &P) -> Result<(NonBlock<UnixStream>, bool)>

fn listen(self, backlog: usize) -> Result<NonBlock<UnixListener>>

impl NonBlock<UnixListener>

fn accept(&self) -> Result<Option<NonBlock<UnixStream>>>

Trait Implementations

impl<S: Socket> Socket for NonBlock<S>

fn linger(&self) -> Result<usize>

fn set_linger(&self, dur_s: usize) -> Result<()>

fn set_reuseaddr(&self, val: bool) -> Result<()>

fn set_reuseport(&self, val: bool) -> Result<()>

fn set_tcp_nodelay(&self, val: bool) -> Result<()>

fn set_read_timeout_ms(&self, val: usize) -> Result<()>

fn set_write_timeout_ms(&self, val: usize) -> Result<()>

impl<T> Deref for NonBlock<T>

type Target = T

fn deref(&self) -> &T

impl<T> DerefMut for NonBlock<T>

fn deref_mut(&mut self) -> &mut T

impl<T: Read> TryRead for NonBlock<T>

fn read_slice(&mut self, buf: &mut [u8]) -> Result<Option<usize>>

fn read<B: MutBuf>(&mut self, buf: &mut B) -> Result<Option<usize>>

impl<T: Write> TryWrite for NonBlock<T>

fn write_slice(&mut self, buf: &[u8]) -> Result<Option<usize>>

fn write<B: Buf>(&mut self, buf: &mut B) -> Result<Option<usize>>

impl<T: AsRawFd> AsRawFd for NonBlock<T>

fn as_raw_fd(&self) -> RawFd

impl<T: FromFd> FromFd for NonBlock<T>

fn from_fd(fd: RawFd) -> NonBlock<T>

impl<T: Evented> Evented for NonBlock<T>

Derived Implementations

impl<T: Ord> Ord for NonBlock<T> where T: Ord

fn cmp(&self, __arg_0: &NonBlock<T>) -> Ordering

impl<T: PartialOrd> PartialOrd for NonBlock<T> where T: PartialOrd

fn partial_cmp(&self, __arg_0: &NonBlock<T>) -> Option<Ordering>

fn lt(&self, __arg_0: &NonBlock<T>) -> bool

fn le(&self, __arg_0: &NonBlock<T>) -> bool

fn gt(&self, __arg_0: &NonBlock<T>) -> bool

fn ge(&self, __arg_0: &NonBlock<T>) -> bool

impl<T: Hash> Hash for NonBlock<T> where T: Hash

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl<T: PartialEq> PartialEq for NonBlock<T> where T: PartialEq

fn eq(&self, __arg_0: &NonBlock<T>) -> bool

fn ne(&self, __arg_0: &NonBlock<T>) -> bool

impl<T: Eq> Eq for NonBlock<T> where T: Eq

impl<T: Debug> Debug for NonBlock<T> where T: Debug

fn fmt(&self, __arg_0: &mut Formatter) -> Result