pub struct IoReader<R> { /* private fields */ }Available on crate feature
std and (crate features alloc or derive or serde or std) only.Expand description
Adapts a standard reader for bincode’s Reader trait.
This is also the reader type returned by the owned Serde decoder constructors.
Implementations§
Trait Implementations§
Source§impl<R> Reader for IoReader<R>where
R: Read,
impl<R> Reader for IoReader<R>where
R: Read,
Source§fn read(&mut self, bytes: &mut [u8]) -> Result<(), DecodeError>
fn read(&mut self, bytes: &mut [u8]) -> Result<(), DecodeError>
Fill the given
bytes argument with values. Exactly the length of the given slice must be filled, or else an error must be returned.Auto Trait Implementations§
impl<R> Freeze for IoReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for IoReader<R>where
R: RefUnwindSafe,
impl<R> Send for IoReader<R>where
R: Send,
impl<R> Sync for IoReader<R>where
R: Sync,
impl<R> Unpin for IoReader<R>where
R: Unpin,
impl<R> UnsafeUnpin for IoReader<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for IoReader<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more