[−][src]Struct genio::std_impls::GenioIo
Wrapper providing genio::Read + genio::Write
traits for std::io::Read + std::io::Write
types.
Methods
impl<T: Read + Write> GenioIo<T>
[src]
pub fn new(io: T) -> Self
[src]
Wraps std
reader+writer into genio
reader+writer.
pub fn into_inner(self) -> T
[src]
Unwraps std
reader+writer into genio
reader+writer.
Trait Implementations
impl<T: Read> Read for GenioIo<T>
[src]
type ReadError = Error
Value of this type is returned when read()
fails. Read more
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>
[src]
fn read_exact(
&mut self,
buf: &mut [u8]
) -> Result<(), ReadExactError<Self::ReadError>>
[src]
&mut self,
buf: &mut [u8]
) -> Result<(), ReadExactError<Self::ReadError>>
Read the exact number of bytes required to fill buf
. Read more
fn available_bytes(&self, _at_least: usize) -> bool
[src]
Hints whether there are at least at_least
bytes available. Read more
fn chain<R: Read>(self, other: R) -> Chain<Self, R> where
Self: Sized,
[src]
Self: Sized,
Chains another reader after self
. When self ends (returns Ok(0)), the other reader will provide bytes to read. Read more
fn read_to_end<T: ExtendFromReader>(
&mut self,
container: &mut T
) -> Result<usize, ExtendError<Self::ReadError, T::ExtendError>> where
Self: ReadOverwrite,
[src]
&mut self,
container: &mut T
) -> Result<usize, ExtendError<Self::ReadError, T::ExtendError>> where
Self: ReadOverwrite,
Reads all bytes into any type that can be extended by a reader. This is more generic than the case of std::io
and might enable some optimizations. Read more
fn by_ref(&mut self) -> &mut Self where
Self: Sized,
[src]
Self: Sized,
Creates a "by reference" adaptor for this instance of Read
. Read more
impl<T: Write> Write for GenioIo<T>
[src]
type WriteError = Error
Value of this type is returned when write()
fails. Read more
type FlushError = Error
Value of this type is returned when flush()
fails. In case of low-level writers flush often does nothing and therefore doesn't return error, so this type might be Void. Read more
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
[src]
fn flush(&mut self) -> Result<(), Error>
[src]
fn size_hint(&mut self, _bytes: usize)
[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::WriteError>
[src]
Attempts to write an entire buffer into this Write
.
fn uses_size_hint(&self) -> bool
[src]
Reports to the caller whether size hint is actually used. This can prevent costly computation of size hint that would be thrown away. Read more
Auto Trait Implementations
Blanket Implementations
impl<R> ReadExt for R where
R: Read + ?Sized,
[src]
R: Read + ?Sized,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> From for T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,