Struct nuclei::Handle [−][src]
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]
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]
&self
) -> impl Stream<Item = Result<Handle<TcpStream>>> + Send + Unpin + '_
impl Handle<TcpStream>
[src]
pub async fn connect<A: ToSocketAddrs>(
sock_addrs: A
) -> Result<Handle<TcpStream>>
[src]
sock_addrs: A
) -> Result<Handle<TcpStream>>
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]
sock_addrs: A
) -> Result<Handle<UdpSocket>>
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]
&self,
buf: &[u8],
addr: A
) -> Result<usize>
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]
&self
) -> impl Stream<Item = Result<Handle<UnixStream>>> + Send + Unpin + '_
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]
&self,
buf: &[u8],
path: P
) -> Result<usize>
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]
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
pub fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncRead for Handle<TcpStream>
[src]
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
pub fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncRead for Handle<UnixStream>
[src]
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
pub fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncRead for &Handle<File>
[src]
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
pub fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncRead for &Handle<TcpStream>
[src]
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
pub fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncRead for &Handle<UnixStream>
[src]
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize>>
pub fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &mut [IoSliceMut<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncSeek for Handle<File>
[src]
impl AsyncWrite for Handle<File>
[src]
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
pub fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncWrite for Handle<TcpStream>
[src]
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
pub fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncWrite for Handle<UnixStream>
[src]
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
pub fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncWrite for &Handle<File>
[src]
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
fn poll_close(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
pub fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncWrite for &Handle<TcpStream>
[src]
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
fn poll_close(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
pub fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
impl AsyncWrite for &Handle<UnixStream>
[src]
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
fn poll_close(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<()>>
[src]
pub fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
impl<T: Debug> Debug for Handle<T>
[src]
impl<T> Deref for Handle<T>
[src]
impl<T> DerefMut for Handle<T>
[src]
impl<T> HandleOpRegisterer for Handle<T>
[src]
fn read_registerer(&self) -> Arc<TTas<Option<AsyncOp<usize>>>>
[src]
fn write_registerer(&self) -> Arc<TTas<Option<AsyncOp<usize>>>>
[src]
impl<T> HandleOpRegisterer for &Handle<T>
[src]
fn read_registerer(&self) -> Arc<TTas<Option<AsyncOp<usize>>>>
[src]
fn write_registerer(&self) -> Arc<TTas<Option<AsyncOp<usize>>>>
[src]
impl<T: IntoRawFd> IntoRawFd for Handle<T>
[src]
fn into_raw_fd(self) -> RawFd
[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]
T: Unpin,
impl<T> !UnwindSafe for Handle<T>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsAny for T where
T: Any,
T: Any,
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
[src]
R: AsyncRead + ?Sized,
pub fn chain<R>(self, next: R) -> Chain<Self, R> where
R: AsyncRead,
[src]
R: AsyncRead,
pub fn read(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
pub fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self> where
Self: Unpin,
[src]
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self> where
Self: Unpin,
pub fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
pub fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEnd<'a, Self> where
Self: Unpin,
[src]
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEnd<'a, Self> where
Self: Unpin,
pub fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToString<'a, Self> where
Self: Unpin,
[src]
&'a mut self,
buf: &'a mut String
) -> ReadToString<'a, Self> where
Self: Unpin,
pub fn split(self) -> (ReadHalf<Self>, WriteHalf<Self>) where
Self: AsyncWrite,
[src]
Self: AsyncWrite,
pub fn take(self, limit: u64) -> Take<Self>
[src]
impl<S> AsyncSeekExt for S where
S: AsyncSeek + ?Sized,
[src]
S: AsyncSeek + ?Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
[src]
W: AsyncWrite + ?Sized,
pub fn flush(&mut self) -> Flush<'_, Self> where
Self: Unpin,
[src]
Self: Unpin,
pub fn close(&mut self) -> Close<'_, Self> where
Self: Unpin,
[src]
Self: Unpin,
pub fn write(&'a mut self, buf: &'a [u8]) -> Write<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
pub fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self> where
Self: Unpin,
[src]
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self> where
Self: Unpin,
pub fn write_all(&'a mut self, buf: &'a [u8]) -> WriteAll<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
pub fn into_sink<Item>(self) -> IntoSink<Self, Item> where
Item: AsRef<[u8]>,
[src]
Item: AsRef<[u8]>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> State for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,