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§
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,
Sourcefn 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,
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".