pub struct BinaryReader<R>{ /* private fields */ }
Expand description
Read from a stream.
Implementations§
Source§impl<R: Read + Seek> BinaryReader<R>
impl<R: Read + Seek> BinaryReader<R>
Sourcepub fn stream_position(&mut self) -> Result<u64>
pub fn stream_position(&mut self) -> Result<u64>
Get the current seek position.
Sourcepub fn len(&mut self) -> Result<u64>
pub fn len(&mut self) -> Result<u64>
Get the length of this stream by seeking to the end and then restoring the previous cursor position.
Sourcepub fn read_string(&mut self) -> Result<String>
pub fn read_string(&mut self) -> Result<String>
Read a length-prefixed String
from the stream.
Sourcepub fn read_isize(&mut self) -> Result<isize>
Available on 64-bit only.
pub fn read_isize(&mut self) -> Result<isize>
Read an isize
from the stream.
Sourcepub fn read_usize(&mut self) -> Result<usize>
Available on 64-bit only.
pub fn read_usize(&mut self) -> Result<usize>
Read a usize
from the stream.
Auto Trait Implementations§
impl<R> Freeze for BinaryReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for BinaryReader<R>where
R: RefUnwindSafe,
impl<R> Send for BinaryReader<R>where
R: Send,
impl<R> Sync for BinaryReader<R>where
R: Sync,
impl<R> Unpin for BinaryReader<R>where
R: Unpin,
impl<R> UnwindSafe for BinaryReader<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