pub struct BufReader<'a, B: Buf> { /* private fields */ }
Expand description
Protocol version-aware wrapper around a Buf
impl
Implementations
Trait Implementations
sourceimpl<'a, B: Buf> Reader for BufReader<'a, B>
impl<'a, B: Buf> Reader for BufReader<'a, B>
sourcefn deserialization_mode(&self) -> DeserializationMode
fn deserialization_mode(&self) -> DeserializationMode
The mode this reader is reading from
sourcefn read_bytes_len_prefix(&mut self) -> Result<Vec<u8>, Error>
fn read_bytes_len_prefix(&mut self) -> Result<Vec<u8>, Error>
Read a u64 len prefix followed by that number of exact bytes.
sourcefn read_fixed_bytes(&mut self, len: usize) -> Result<Vec<u8>, Error>
fn read_fixed_bytes(&mut self, len: usize) -> Result<Vec<u8>, Error>
Read a fixed number of bytes from the underlying reader.
sourcefn expect_u8(&mut self, val: u8) -> Result<u8, Error>
fn expect_u8(&mut self, val: u8) -> Result<u8, Error>
Consumes a byte from the reader, producing an error if it doesn’t have the expected value Read more
sourcefn protocol_version(&self) -> ProtocolVersion
fn protocol_version(&self) -> ProtocolVersion
Access to underlying protocol version to support version specific deserialization logic. Read more
Auto Trait Implementations
impl<'a, B> RefUnwindSafe for BufReader<'a, B> where
B: RefUnwindSafe,
impl<'a, B> Send for BufReader<'a, B> where
B: Send,
impl<'a, B> Sync for BufReader<'a, B> where
B: Sync,
impl<'a, B> Unpin for BufReader<'a, B>
impl<'a, B> !UnwindSafe for BufReader<'a, B>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more