pub struct EndianFile { /* private fields */ }
Expand description
A helper structure that provides convenience methods to write to
a fs::File, being aware of the file’s Endianness.
Writes a u8 to the file.
This method returns the same errors as Write::write_all.
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.
This method returns the same errors as Write::write_all.
Writes a u16 to the file.
This method returns the same errors as Write::write_all.
Writes a u32 to the file.
This method returns the same errors as Write::write_all.
Writes a i8 to the file.
This method returns the same errors as Write::write_all.
Writes a i16 to the file.
This method returns the same errors as Write::write_all.
Writes a i32 to the file.
This method returns the same errors as Write::write_all.
Writes a f32 to the file.
This method returns the same errors as Write::write_all.
Writes a f64 to the file.
This method returns the same errors as Write::write_all.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.