Trait server::storage::bstar::KnownSize
[−]
[src]
pub trait KnownSize { fn size() -> u64; fn read(&mut File, Option<u64>) -> Result<Self>; fn write(&self, &mut File, Option<u64>) -> Result<()>; fn write_default(&mut File, Option<u64>) -> Result<()>; }
Required Methods
fn size() -> u64
returns the fixed size of all objects ever created
fn read(&mut File, Option<u64>) -> Result<Self>
reads the object from file, at address if specified. if the address is not specified, the object will be read from wherever the current seek is
fn write(&self, &mut File, Option<u64>) -> Result<()>
writes the object to file, at address if specified. if the address is not specified, the object will be written to wherever the current seek is
fn write_default(&mut File, Option<u64>) -> Result<()>
writes a defaultversion of the Type to file if no address is specified, the default will be written to wherever the current seek of the file is.