Skip to main content

CollaborationStorage

Trait CollaborationStorage 

Source
pub trait CollaborationStorage:
    Send
    + Sync
    + Debug {
    // Required methods
    fn descriptor(&self) -> CollaborationStorageDescriptor;
    fn load_state<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<CollaborationCatalogState>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn compare_and_swap<'life0, 'life1, 'async_trait>(
        &'life0 self,
        expected_generation: u64,
        next: &'life1 CollaborationCatalogState,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn descriptor(&self) -> CollaborationStorageDescriptor

Source

fn load_state<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<CollaborationCatalogState>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn compare_and_swap<'life0, 'life1, 'async_trait>( &'life0 self, expected_generation: u64, next: &'life1 CollaborationCatalogState, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Replace the complete catalog only when its durable generation still matches expected_generation. One replacement is the atomic I1 commit.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§