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§

source

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.

source

fn get_forest( &self, owner: &WildlandPubKey ) -> CatlibResult<Arc<dyn ForestManifest>>

source

fn get_container(&self, uuid: Uuid) -> CatlibResult<Arc<dyn ContainerManifest>>

Return crate::Container object by Container UUID.

source

fn is_db_alive(&self) -> CatlibResult<()>

Check if database backend is available

Implementors§