Trait nncombinator::persistence::LinearPersistence
source · [−]pub trait LinearPersistence<U> {
fn read(&mut self) -> Result<U, ConfigReadError>;
fn write(&mut self, u: U) -> Result<(), PersistenceError>;
fn verify_eof(&mut self) -> Result<(), ConfigReadError>;
}
Expand description
Trait to define an implementation to persist the model in a flat data structure
Required Methods
sourcefn read(&mut self) -> Result<U, ConfigReadError>
fn read(&mut self) -> Result<U, ConfigReadError>
sourcefn write(&mut self, u: U) -> Result<(), PersistenceError>
fn write(&mut self, u: U) -> Result<(), PersistenceError>
sourcefn verify_eof(&mut self) -> Result<(), ConfigReadError>
fn verify_eof(&mut self) -> Result<(), ConfigReadError>
Has the read position of the persisted information reached EOF?
Errors
This function may return the following errors