pub trait DistributedProtocol: Send + Sync {
// Required methods
fn broadcast<'life0, 'async_trait>(
&'life0 self,
operation: CacheOperation,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_operation<'life0, 'async_trait>(
&'life0 self,
operation: CacheOperation,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sync_with_peer<'life0, 'life1, 'async_trait>(
&'life0 self,
peer_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Distributed cache protocol
Required Methods§
Sourcefn broadcast<'life0, 'async_trait>(
&'life0 self,
operation: CacheOperation,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn broadcast<'life0, 'async_trait>(
&'life0 self,
operation: CacheOperation,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Broadcast operation to peers
Sourcefn handle_operation<'life0, 'async_trait>(
&'life0 self,
operation: CacheOperation,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_operation<'life0, 'async_trait>(
&'life0 self,
operation: CacheOperation,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle incoming operation