Trait skullrump::BinaryEntry
[−]
[src]
pub trait BinaryEntry: Sized { fn entry_write(data_in: Self, buffer_out: &mut Vec<u8>) -> Result<()>; fn entry_read(file: &mut File) -> Result<Self>; fn entry_size() -> i64; }
A single entry to be written to a binary file.
Required Methods
fn entry_write(data_in: Self, buffer_out: &mut Vec<u8>) -> Result<()>
Write an entry to a reusable output buffer.
fn entry_read(file: &mut File) -> Result<Self>
Read an entry from a file.
fn entry_size() -> i64
Get the size of an entry.
Entries can vary in complexity, so it's necessary to implement this rather than magically calculate it.