Struct nuclei::Handle[][src]

pub struct Handle<T> { /* fields omitted */ }

Handle that manages IO submitted to proactor system.

This handle wraps io element, its' completion channel, if file, file buffers and input output operations It is single handedly responsible for dispatching correct operations to IO driver. Speed of IO bound to speed of executor, handle neither interferes with executor nor tightly coupled.

Implementations

impl<T> Handle<T>[src]

pub fn get_ref(&self) -> &T[src]

pub fn get_mut(&mut self) -> &mut T[src]

pub fn into_inner(mut self: Self) -> T[src]

impl<T: AsRawFd> Handle<T>[src]

pub fn new(io: T) -> Result<Handle<T>>[src]

impl Handle<TcpListener>[src]

pub fn bind<A: ToSocketAddrs>(addr: A) -> Result<Handle<TcpListener>>[src]

pub async fn accept(&self) -> Result<(Handle<TcpStream>, SocketAddr)>[src]

pub fn incoming(
    &self
) -> impl Stream<Item = Result<Handle<TcpStream>>> + Send + Unpin + '_
[src]

impl Handle<TcpStream>[src]

pub async fn connect<A: ToSocketAddrs>(
    sock_addrs: A
) -> Result<Handle<TcpStream>>
[src]

pub async fn send(&self, buf: &[u8]) -> Result<usize>[src]

pub async fn recv(&self, buf: &mut [u8]) -> Result<usize>[src]

pub async fn peek(&self, buf: &mut [u8]) -> Result<usize>[src]

impl Handle<UdpSocket>[src]

pub fn bind<A: ToSocketAddrs>(addr: A) -> Result<Handle<UdpSocket>>[src]

pub async fn connect<A: ToSocketAddrs>(
    sock_addrs: A
) -> Result<Handle<UdpSocket>>
[src]

pub async fn send(&self, buf: &[u8]) -> Result<usize>[src]

pub async fn recv(&self, buf: &mut [u8]) -> Result<usize>[src]

pub async fn peek(&self, buf: &mut [u8]) -> Result<usize>[src]

pub async fn send_to<A: ToSocketAddrs>(
    &self,
    buf: &[u8],
    addr: A
) -> Result<usize>
[src]

pub async fn recv_from(&self, buf: &mut [u8]) -> Result<(usize, SocketAddr)>[src]

pub async fn peek_from(&self, buf: &mut [u8]) -> Result<(usize, SocketAddr)>[src]

impl Handle<UnixListener>[src]

pub fn bind<P: AsRef<Path>>(path: P) -> Result<Handle<UnixListener>>[src]

pub async fn accept(&self) -> Result<(Handle<UnixStream>, UnixSocketAddr)>[src]

pub fn incoming(
    &self
) -> impl Stream<Item = Result<Handle<UnixStream>>> + Send + Unpin + '_
[src]

impl Handle<UnixStream>[src]

pub async fn connect<P: AsRef<Path>>(path: P) -> Result<Handle<UnixStream>>[src]

pub fn pair() -> Result<(Handle<UnixStream>, Handle<UnixStream>)>[src]

pub async fn send(&self, buf: &[u8]) -> Result<usize>[src]

pub async fn recv(&self, buf: &mut [u8]) -> Result<usize>[src]

pub async fn peek(&self, buf: &mut [u8]) -> Result<usize>[src]

impl Handle<UnixDatagram>[src]

pub fn bind<P: AsRef<Path>>(path: P) -> Result<Handle<UnixDatagram>>[src]

pub fn pair() -> Result<(Handle<UnixDatagram>, Handle<UnixDatagram>)>[src]

pub async fn send(&self, buf: &[u8]) -> Result<usize>[src]

pub async fn recv(&self, buf: &mut [u8]) -> Result<usize>[src]

pub async fn peek(&self, buf: &mut [u8]) -> Result<usize>[src]

pub async fn send_to<P: AsRef<Path>>(
    &self,
    buf: &[u8],
    path: P
) -> Result<usize>
[src]

pub async fn recv_from(&self, buf: &mut [u8]) -> Result<(usize, UnixSocketAddr)>[src]

pub async fn peek_from(&self, buf: &mut [u8]) -> Result<(usize, UnixSocketAddr)>[src]

Trait Implementations

impl<T: AsRawFd> AsRawFd for Handle<T>[src]

impl AsyncRead for Handle<File>[src]

impl AsyncRead for Handle<TcpStream>[src]

impl AsyncRead for Handle<UnixStream>[src]

impl AsyncRead for &Handle<File>[src]

impl AsyncRead for &Handle<TcpStream>[src]

impl AsyncRead for &Handle<UnixStream>[src]

impl AsyncSeek for Handle<File>[src]

impl AsyncWrite for Handle<File>[src]

impl AsyncWrite for Handle<TcpStream>[src]

impl AsyncWrite for Handle<UnixStream>[src]

impl AsyncWrite for &Handle<File>[src]

impl AsyncWrite for &Handle<TcpStream>[src]

impl AsyncWrite for &Handle<UnixStream>[src]

impl<T: Debug> Debug for Handle<T>[src]

impl<T> Deref for Handle<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T> DerefMut for Handle<T>[src]

impl<T> HandleOpRegisterer for Handle<T>[src]

impl<T> HandleOpRegisterer for &Handle<T>[src]

impl<T: IntoRawFd> IntoRawFd for Handle<T>[src]

impl<T> Send for Handle<T>[src]

impl<T> Sync for Handle<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Handle<T>[src]

impl<T> Unpin for Handle<T> where
    T: Unpin
[src]

impl<T> !UnwindSafe for Handle<T>[src]

Blanket Implementations

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

impl<T> AsAny for T where
    T: Any

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<S> AsyncSeekExt for S where
    S: AsyncSeek + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?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> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> State for T where
    T: Send + Sync + 'static, 

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.