Trait wildland_corex::catlib_service::interface::CatLib
source · pub trait CatLib: Send + Sync {
// Required methods
fn create_forest(
&self,
owner: WildlandPubKey,
devices: Devices,
data: Vec<u8>
) -> CatlibResult<Arc<dyn ForestManifest>>;
fn get_forest(
&self,
owner: &WildlandPubKey
) -> CatlibResult<Arc<dyn ForestManifest>>;
fn get_container(
&self,
uuid: Uuid
) -> CatlibResult<Arc<dyn ContainerManifest>>;
fn is_db_alive(&self) -> CatlibResult<()>;
}
Required Methods§
sourcefn create_forest(
&self,
owner: WildlandPubKey,
devices: Devices,
data: Vec<u8>
) -> CatlibResult<Arc<dyn ForestManifest>>
fn create_forest( &self, owner: WildlandPubKey, devices: Devices, data: Vec<u8> ) -> CatlibResult<Arc<dyn ForestManifest>>
Create new Forest object.
owner
and devices
are cryptographical objects that are used by the Core module to
verify the cryptographical integrity of the manifests.
data
is an arbitrary data object that can be used to synchronize Forest state between
devices.
fn get_forest( &self, owner: &WildlandPubKey ) -> CatlibResult<Arc<dyn ForestManifest>>
sourcefn get_container(&self, uuid: Uuid) -> CatlibResult<Arc<dyn ContainerManifest>>
fn get_container(&self, uuid: Uuid) -> CatlibResult<Arc<dyn ContainerManifest>>
Return crate::Container
object by Container UUID.
sourcefn is_db_alive(&self) -> CatlibResult<()>
fn is_db_alive(&self) -> CatlibResult<()>
Check if database backend is available