pub trait DataRWAdapter<R, W> {
type Reader: Read;
type Writer: Write;
// Required methods
fn adapt_reader(&self, reader: R) -> Self::Reader
where R: Read;
fn adapt_writer(&self, writer: W) -> Self::Writer
where W: Write;
}
Expand description
An adapter of byte read and write streams.
Required Associated Types§
Required Methods§
Sourcefn adapt_reader(&self, reader: R) -> Self::Readerwhere
R: Read,
fn adapt_reader(&self, reader: R) -> Self::Readerwhere
R: Read,
Adapt a byte reader.
Sourcefn adapt_writer(&self, writer: W) -> Self::Writerwhere
W: Write,
fn adapt_writer(&self, writer: W) -> Self::Writerwhere
W: Write,
Adapt a byte writer.
Implementations on Foreign Types§
Source§impl<T, R, W> DataRWAdapter<R, W> for &T
impl<T, R, W> DataRWAdapter<R, W> for &T
Source§fn adapt_reader(&self, reader: R) -> Self::Readerwhere
R: Read,
fn adapt_reader(&self, reader: R) -> Self::Readerwhere
R: Read,
Adapt a byte reader.
Source§fn adapt_writer(&self, writer: W) -> Self::Writerwhere
W: Write,
fn adapt_writer(&self, writer: W) -> Self::Writerwhere
W: Write,
Adapt a byte writer.