pub trait ChordStorageInterface<const REDUNDANT: u16> {
// Required methods
fn storage_fetch<'life0, 'async_trait>(
&'life0 self,
entry_key: Did,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn storage_store<'life0, 'async_trait>(
&'life0 self,
entry: Entry,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
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>>
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>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn storage_tombstone_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
data: Encoded,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn storage_compact_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
removals: Vec<Encoded>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
ChordStorageInterface should imply necessary method for DHT storage
Required Methods§
Sourcefn storage_fetch<'life0, 'async_trait>(
&'life0 self,
entry_key: Did,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn storage_fetch<'life0, 'async_trait>(
&'life0 self,
entry_key: Did,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Fetch an entry from DHT storage.
Sourcefn storage_store<'life0, 'async_trait>(
&'life0 self,
entry: Entry,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn storage_store<'life0, 'async_trait>(
&'life0 self,
entry: Entry,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Store an entry on DHT storage.
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>>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>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Append data to a Data kind entry.
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>>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>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Append data to a Data kind entry uniquely.
Sourcefn storage_tombstone_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
data: Encoded,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn storage_tombstone_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
data: Encoded,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Tombstone observed data in a Data kind entry.
Sourcefn storage_compact_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
removals: Vec<Encoded>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn storage_compact_data<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
removals: Vec<Encoded>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Compact a Data kind entry after removing listed payloads.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".