Trait rings_node::prelude::ChordStorageInterface
source · pub trait ChordStorageInterface {
fn storage_check_cache<'life0, 'async_trait>(
&'life0 self,
vid: Did
) -> Pin<Box<dyn Future<Output = Option<VirtualNode>> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn storage_fetch<'life0, 'async_trait>(
&'life0 self,
vid: Did
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn storage_store<'life0, 'async_trait>(
&'life0 self,
vnode: VirtualNode
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn storage_append_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
data: Encoded
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn storage_touch_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
data: Encoded
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
ChordStorageInterface should imply necessary method for DHT storage
Required Methods§
sourcefn storage_check_cache<'life0, 'async_trait>(
&'life0 self,
vid: Did
) -> Pin<Box<dyn Future<Output = Option<VirtualNode>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
fn storage_check_cache<'life0, 'async_trait>(
&'life0 self,
vid: Did
) -> Pin<Box<dyn Future<Output = Option<VirtualNode>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
check local cache of dht
sourcefn storage_fetch<'life0, 'async_trait>(
&'life0 self,
vid: Did
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
fn storage_fetch<'life0, 'async_trait>(
&'life0 self,
vid: Did
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
fetch virtual node from DHT
sourcefn storage_store<'life0, 'async_trait>(
&'life0 self,
vnode: VirtualNode
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
fn storage_store<'life0, 'async_trait>(
&'life0 self,
vnode: VirtualNode
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
store virtual node on DHT
sourcefn storage_append_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
data: Encoded
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn storage_append_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
data: Encoded
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
append data to Data type virtual node
sourcefn storage_touch_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
data: Encoded
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn storage_touch_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
data: Encoded
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
append data to Data type virtual node uniquely