Struct bytecodec::io::BufferedIo
[−]
[src]
pub struct BufferedIo<T> { /* fields omitted */ }
Buffered I/O stream.
Methods
impl<T: Read + Write> BufferedIo<T>
[src]
pub fn new(stream: T, read_buf_size: usize, write_buf_size: usize) -> Self
[src]
Makes a new BufferedIo
instance.
pub fn execute_io(&mut self) -> Result<()>
[src]
Executes an I/O operation on the inner stream.
"I/O operation" means "filling the read buffer" and "flushing the write buffer".
pub fn is_eos(&self) -> bool
[src]
Returns true
if the inner stream reaches EOS, otherwise false
.
pub fn would_block(&self) -> bool
[src]
Returns true
if the previous I/O operation on the inner stream would block, otherwise false
.
ⓘImportant traits for ReadBuf<B>pub fn read_buf_ref(&self) -> &ReadBuf<Vec<u8>>
[src]
Returns a reference to the read buffer of the instance.
ⓘImportant traits for ReadBuf<B>pub fn read_buf_mut(&mut self) -> &mut ReadBuf<Vec<u8>>
[src]
Returns a mutable reference to the read buffer of the instance.
ⓘImportant traits for WriteBuf<B>pub fn write_buf_ref(&self) -> &WriteBuf<Vec<u8>>
[src]
Returns a reference to the write buffer of the instance.
ⓘImportant traits for WriteBuf<B>pub fn write_buf_mut(&mut self) -> &mut WriteBuf<Vec<u8>>
[src]
Returns a mutable reference to the write buffer of the instance.
ⓘImportant traits for &'a mut Wpub fn stream_ref(&self) -> &T
[src]
Returns a reference to the inner stream of the instance.
ⓘImportant traits for &'a mut Wpub fn stream_mut(&mut self) -> &mut T
[src]
Returns a mutable reference to the inner stream of the instance.
pub fn into_stream(self) -> T
[src]
Takes ownership of the instance, and returns the inner stream.
Trait Implementations
impl<T: Debug> Debug for BufferedIo<T>
[src]
Auto Trait Implementations
impl<T> Send for BufferedIo<T> where
T: Send,
T: Send,
impl<T> Sync for BufferedIo<T> where
T: Sync,
T: Sync,