[−][src]Trait bi::Bi
Bi
Simple trait for reading/writing resources
Implementations are not required to make read/write IDs unique. It's simply because usize
has limit. However, for example, on 32-bit
system, you still have billions of IDs to use.
Associated Types
Loading content...Required methods
fn max_buf_size(&self) -> usize
fn buf_size(&self) -> usize
fn read(&self, res: Self::Input) -> Result<(usize, Vec<u8>)>
fn read_to_string(&self, res: Self::Input) -> Result<(usize, String)>
fn release_read(&self, read_id: usize) -> Result<()>
fn write<B: AsRef<[u8]>>(&self, bytes: B, res: &mut Self::Output) -> Result<()>
Implementors
impl<R, W> Bi for RwBi<R, W> where
R: Read,
W: Write,
[src]
R: Read,
W: Write,