Struct bastion::io::Handle [−][src]
pub struct Handle<T> { /* fields omitted */ }
Expand description
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
Trait Implementations
Attempt to read from the AsyncRead
into buf
. Read more
Attempt to read from the AsyncRead
into buf
. Read more
Attempt to read from the AsyncRead
into buf
. Read more
Attempt to read from the AsyncRead
into buf
. Read more
Attempt to read from the AsyncRead
into buf
. Read more
Attempt to read from the AsyncRead
into buf
. Read more
Attempt to write bytes from buf
into the object. Read more
pub fn poll_flush(
self: Pin<&mut &'_ Handle<UnixStream>>,
_cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
pub fn poll_flush(
self: Pin<&mut &'_ Handle<UnixStream>>,
_cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
pub fn poll_close(
self: Pin<&mut &'_ Handle<UnixStream>>,
_cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
pub fn poll_close(
self: Pin<&mut &'_ Handle<UnixStream>>,
_cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
Attempt to close the object. Read more
Attempt to write bytes from buf
into the object. Read more
pub fn poll_flush(
self: Pin<&mut Handle<UnixStream>>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
pub fn poll_flush(
self: Pin<&mut Handle<UnixStream>>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
pub fn poll_close(
self: Pin<&mut Handle<UnixStream>>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
pub fn poll_close(
self: Pin<&mut Handle<UnixStream>>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
Attempt to close the object. Read more
Consumes this object, returning the raw underlying file descriptor. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for Handle<T>
impl<T> !UnwindSafe for Handle<T>
Blanket Implementations
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: AsyncRead,
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: AsyncRead,
Creates an adaptor which will chain this stream with another. Read more
Tries to read some bytes directly into the given buf
in asynchronous
manner, returning a future type. Read more
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self> where
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self> where
Self: Unpin,
Creates a future which will read from the AsyncRead
into bufs
using vectored
IO operations. Read more
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> where
Self: Unpin,
Creates a future which will read exactly enough bytes to fill buf
,
returning an error if end of file (EOF) is hit sooner. Read more
fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEnd<'a, Self> where
Self: Unpin,
fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEnd<'a, Self> where
Self: Unpin,
Creates a future which will read all the bytes from this AsyncRead
. Read more
fn read_to_string(&'a mut self, buf: &'a mut String) -> ReadToString<'a, Self> where
Self: Unpin,
fn read_to_string(&'a mut self, buf: &'a mut String) -> ReadToString<'a, Self> where
Self: Unpin,
Creates a future which will read all the bytes from this AsyncRead
. Read more
Helper method for splitting this read/write object into two halves. Read more
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
Reads some bytes from the byte stream. Read more
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
Like [read()
][AsyncReadExt::read()
], except it reads into a slice of buffers. Read more
fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEndFuture<'a, Self> where
Self: Unpin,
fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEndFuture<'a, Self> where
Self: Unpin,
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin,
Reads the exact number of bytes required to fill buf
. Read more
Creates an adapter which will read at most limit
bytes from it. Read more
impl<S> AsyncSeekExt for S where
S: AsyncSeek + ?Sized,
impl<S> AsyncSeekExt for S where
S: AsyncSeek + ?Sized,
Creates a future which will seek an IO object, and then yield the new position in the object and the object itself. Read more
fn stream_position(&mut self) -> Seek<'_, Self> where
Self: Unpin,
fn stream_position(&mut self) -> Seek<'_, Self> where
Self: Unpin,
Creates a future which will return the current seek position from the start of the stream. Read more
impl<S> AsyncSeekExt for S where
S: AsyncSeek + ?Sized,
impl<S> AsyncSeekExt for S where
S: AsyncSeek + ?Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
Creates a future which will entirely flush this AsyncWrite
. Read more
Creates a future which will entirely close this AsyncWrite
.
Creates a future which will write bytes from buf
into the object. Read more
fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self> where
Self: Unpin,
fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self> where
Self: Unpin,
Creates a future which will write bytes from bufs
into the object using vectored
IO operations. Read more
Write data into this object. Read more
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
Writes some bytes into the byte stream. Read more
fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectoredFuture<'a, Self> where
Self: Unpin,
fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectoredFuture<'a, Self> where
Self: Unpin,
Like [write()
][AsyncWriteExt::write()
], except that it writes a slice of buffers. Read more
Writes an entire buffer into the byte stream. Read more
Flushes the stream to ensure that all buffered contents reach their destination. Read more
Mutably borrows from an owned value. Read more
impl<T> ReadExt for T where
T: AsyncRead + ?Sized,
impl<T> ReadExt for T where
T: AsyncRead + ?Sized,
Reads some bytes from the byte stream. Read more
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEndFuture<'a, Self> where
Self: Unpin,
fn read_to_end(
&'a mut self,
buf: &'a mut Vec<u8, Global>
) -> ReadToEndFuture<'a, Self> where
Self: Unpin,
Reads all bytes from the byte stream. Read more
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
Reads all bytes from the byte stream and appends them into a string. Read more
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin,
Reads the exact number of bytes required to fill buf
. Read more
Creates an adaptor which will read at most limit
bytes from it. Read more
Creates a “by reference” adaptor for this instance of Read
. Read more
impl<T> SeekExt for T where
T: AsyncSeek + ?Sized,
impl<T> SeekExt for T where
T: AsyncSeek + ?Sized,
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
impl<T> WriteExt for T where
T: AsyncWrite + ?Sized,
impl<T> WriteExt for T where
T: AsyncWrite + ?Sized,
Writes some bytes into the byte stream. Read more
Flushes the stream to ensure that all buffered contents reach their destination. Read more
fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectoredFuture<'a, Self> where
Self: Unpin,
fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectoredFuture<'a, Self> where
Self: Unpin,
Writes an entire buffer into the byte stream. Read more