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§

source

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 Vec that can later be used with import_layers on a different store.

source

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.

Implementors§