Trait terminus_store::storage::pack::Packable
source · pub trait Packable {
// Required methods
fn export_layers<'life0, 'async_trait>(
&'life0 self,
layer_ids: Box<dyn Iterator<Item = [u32; 5]> + Send>
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn import_layers<'life0, 'life1, 'async_trait>(
&'life0 self,
pack: &'life1 [u8],
layer_ids: Box<dyn Iterator<Item = [u32; 5]> + Send>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Required Methods§
sourcefn export_layers<'life0, 'async_trait>(
&'life0 self,
layer_ids: Box<dyn Iterator<Item = [u32; 5]> + Send>
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn export_layers<'life0, 'async_trait>(
&'life0 self,
layer_ids: Box<dyn Iterator<Item = [u32; 5]> + Send>
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Export the given layers by creating a pack, a Vecimport_layers
on a different store.
sourcefn import_layers<'life0, 'life1, 'async_trait>(
&'life0 self,
pack: &'life1 [u8],
layer_ids: Box<dyn Iterator<Item = [u32; 5]> + Send>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn import_layers<'life0, 'life1, 'async_trait>(
&'life0 self,
pack: &'life1 [u8],
layer_ids: Box<dyn Iterator<Item = [u32; 5]> + Send>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Import the specified layers from the given pack, a byte slice that was previously generated with export_layers
, on another store, and possibly even another machine).
After this operation, the specified layers will be retrievable from this store, provided they existed in the pack. specified layers that are not in the pack are silently ignored.