Trait wildland_catlib::contracts::IStorage
source · [−]pub trait IStorage {
fn uuid(&self) -> Uuid;
fn template_uuid(&self) -> Option<Uuid>;
fn container(&self) -> CatlibResult<Container>;
fn data(&self) -> Vec<u8>;
fn update(&mut self, data: Vec<u8>) -> CatlibResult<Storage>;
}
Required Methods
sourcefn template_uuid(&self) -> Option<Uuid>
fn template_uuid(&self) -> Option<Uuid>
Return Template UUID
sourcefn container(&self) -> CatlibResult<Container>
fn container(&self) -> CatlibResult<Container>
Return Container
that contains the Storage
.
Errors
- Returns
CatlibError::NoRecordsFound
if noContainer
was found. - Returns
CatlibError::MalformedDatabaseEntry
if more than oneContainer
was found.