pub struct EndianFile { /* private fields */ }
Expand description
Helper structure that provides convenience methods to write to
a fs::File
, being aware of the file’s Endianness
.
Implementations§
Source§impl EndianFile
impl EndianFile
Sourcepub fn write_all_u8(&mut self, bytes: &[u8]) -> Result<()>
pub fn write_all_u8(&mut self, bytes: &[u8]) -> Result<()>
Writes a slice of bytes to a file.
This is much more efficient than calling [write_u8
] in a loop if you have list
of bytes to write.
§Errors
This method returns the same errors as Write::write_all
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EndianFile
impl RefUnwindSafe for EndianFile
impl Send for EndianFile
impl Sync for EndianFile
impl Unpin for EndianFile
impl UnwindSafe for EndianFile
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