Struct atm_io_utils::Duplex
[−]
[src]
pub struct Duplex<R, W> { /* fields omitted */ }Implements both (Async)Read and (Async)Write by delegating to an (Async)Read and an (Async)Write, taking ownership of both.
Methods
impl<R, W> Duplex<R, W>[src]
pub fn new(r: R, w: W) -> Duplex<R, W>[src]
Takes ownership of a Read and a Write and creates a new Duplex.
pub fn get_reader_ref(&self) -> &R[src]
Gets a reference to the underlying reader.
pub fn get_reader_mut(&mut self) -> &mut R[src]
Gets a mutable reference to the underlying reader.
pub fn get_writer_ref(&self) -> &W[src]
Gets a reference to the underlying writer.
pub fn get_writer_mut(&mut self) -> &mut W[src]
Gets a mutable reference to the underlying writer.
pub fn into_inner(self) -> (R, W)[src]
Unwraps this Duplex, returning the underlying reader and writer.
Trait Implementations
impl<R: Debug, W: Debug> Debug for Duplex<R, W>[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<R: Copy, W: Copy> Copy for Duplex<R, W>[src]
impl<R: Clone, W: Clone> Clone for Duplex<R, W>[src]
fn clone(&self) -> Duplex<R, W>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<R: PartialEq, W: PartialEq> PartialEq for Duplex<R, W>[src]
fn eq(&self, __arg_0: &Duplex<R, W>) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Duplex<R, W>) -> bool[src]
This method tests for !=.
impl<R: Eq, W: Eq> Eq for Duplex<R, W>[src]
impl<R: AsyncRead, W> AsyncRead for Duplex<R, W>[src]
fn poll_read(&mut self, cx: &mut Context, buf: &mut [u8]) -> Poll<usize, Error>[src]
Attempt to read from the AsyncRead into buf. Read more
unsafe fn initializer(&self) -> Initializer[src]
Determines if this AsyncReader can work with buffers of uninitialized memory. Read more
fn poll_vectored_read(
&mut self,
cx: &mut Context,
vec: &mut [&mut IoVec]
) -> Result<Async<usize>, Error>[src]
&mut self,
cx: &mut Context,
vec: &mut [&mut IoVec]
) -> Result<Async<usize>, Error>
Attempt to read from the AsyncRead into vec using vectored IO operations. Read more
impl<R, W: AsyncWrite> AsyncWrite for Duplex<R, W>[src]
fn poll_write(&mut self, cx: &mut Context, buf: &[u8]) -> Poll<usize, Error>[src]
Attempt to write bytes from buf into the object. Read more
fn poll_flush(&mut self, cx: &mut Context) -> Poll<(), Error>[src]
Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
fn poll_close(&mut self, cx: &mut Context) -> Poll<(), Error>[src]
Attempt to close the object. Read more
fn poll_vectored_write(
&mut self,
cx: &mut Context,
vec: &[&IoVec]
) -> Result<Async<usize>, Error>[src]
&mut self,
cx: &mut Context,
vec: &[&IoVec]
) -> Result<Async<usize>, Error>
Attempt to write bytes from vec into the object using vectored IO operations. Read more