pub struct BinaryWriter<W: Write, F: BinaryFormat> { /* private fields */ }Expand description
Generic binary writer with position tracking.
Implementations§
Source§impl<W: Write, F: BinaryFormat> BinaryWriter<W, F>
impl<W: Write, F: BinaryFormat> BinaryWriter<W, F>
Sourcepub fn take_errors(&mut self) -> Vec<GaiaError>
pub fn take_errors(&mut self) -> Vec<GaiaError>
Take all collected diagnostic errors.
Sourcepub fn write_bytes(&mut self, buf: &[u8]) -> Result<()>
pub fn write_bytes(&mut self, buf: &[u8]) -> Result<()>
Write raw bytes.
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consume the writer and return the inner writer.
Trait Implementations§
Source§impl<W: Write + Debug, F: BinaryFormat> Debug for BinaryWriter<W, F>
impl<W: Write + Debug, F: BinaryFormat> Debug for BinaryWriter<W, F>
Source§impl<W: Write + Seek, F: BinaryFormat> Seek for BinaryWriter<W, F>
impl<W: Write + Seek, F: BinaryFormat> Seek for BinaryWriter<W, F>
Source§fn seek(&mut self, pos: SeekFrom) -> Result<u64>
fn seek(&mut self, pos: SeekFrom) -> Result<u64>
Seek to an offset, in bytes, in a stream. Read more
1.55.0 · Source§fn rewind(&mut self) -> Result<(), Error>
fn rewind(&mut self) -> Result<(), Error>
Rewind to the beginning of a stream. Read more
Source§fn stream_len(&mut self) -> Result<u64, Error>
fn stream_len(&mut self) -> Result<u64, Error>
🔬This is a nightly-only experimental API. (
seek_stream_len)Returns the length of this stream (in bytes). Read more
Auto Trait Implementations§
impl<W, F> Freeze for BinaryWriter<W, F>where
W: Freeze,
impl<W, F> !RefUnwindSafe for BinaryWriter<W, F>
impl<W, F> Send for BinaryWriter<W, F>
impl<W, F> Sync for BinaryWriter<W, F>
impl<W, F> Unpin for BinaryWriter<W, F>
impl<W, F> UnsafeUnpin for BinaryWriter<W, F>where
W: UnsafeUnpin,
impl<W, F> !UnwindSafe for BinaryWriter<W, F>
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