pub trait StorageAdapter: Send + Sync {
// Required methods
fn insert<'life0, 'async_trait, S>(
&'life0 self,
key: <S as StorageSchema>::Key,
val: <S as StorageSchema>::Value,
) -> Pin<Box<dyn Future<Output = ProtocolResult<()>> + Send + 'async_trait>>
where S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'async_trait, S>(
&'life0 self,
key: <S as StorageSchema>::Key,
) -> Pin<Box<dyn Future<Output = ProtocolResult<Option<<S as StorageSchema>::Value>>> + Send + 'async_trait>>
where S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait;
fn remove<'life0, 'async_trait, S>(
&'life0 self,
key: <S as StorageSchema>::Key,
) -> Pin<Box<dyn Future<Output = ProtocolResult<()>> + Send + 'async_trait>>
where S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait;
fn contains<'life0, 'async_trait, S>(
&'life0 self,
key: <S as StorageSchema>::Key,
) -> Pin<Box<dyn Future<Output = ProtocolResult<bool>> + Send + 'async_trait>>
where S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait;
fn batch_modify<'life0, 'async_trait, S>(
&'life0 self,
keys: Vec<<S as StorageSchema>::Key>,
vals: Vec<StorageBatchModify<S>>,
) -> Pin<Box<dyn Future<Output = ProtocolResult<()>> + Send + 'async_trait>>
where S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn get_batch<'life0, 'async_trait, S>(
&'life0 self,
keys: Vec<<S as StorageSchema>::Key>,
) -> Pin<Box<dyn Future<Output = ProtocolResult<Vec<Option<<S as StorageSchema>::Value>>>> + Send + 'async_trait>>
where S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait { ... }
}
Required Methods§
fn insert<'life0, 'async_trait, S>(
&'life0 self,
key: <S as StorageSchema>::Key,
val: <S as StorageSchema>::Value,
) -> Pin<Box<dyn Future<Output = ProtocolResult<()>> + Send + 'async_trait>>where
S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait, S>(
&'life0 self,
key: <S as StorageSchema>::Key,
) -> Pin<Box<dyn Future<Output = ProtocolResult<Option<<S as StorageSchema>::Value>>> + Send + 'async_trait>>where
S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait,
fn remove<'life0, 'async_trait, S>(
&'life0 self,
key: <S as StorageSchema>::Key,
) -> Pin<Box<dyn Future<Output = ProtocolResult<()>> + Send + 'async_trait>>where
S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait,
fn contains<'life0, 'async_trait, S>(
&'life0 self,
key: <S as StorageSchema>::Key,
) -> Pin<Box<dyn Future<Output = ProtocolResult<bool>> + Send + 'async_trait>>where
S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait,
fn batch_modify<'life0, 'async_trait, S>(
&'life0 self,
keys: Vec<<S as StorageSchema>::Key>,
vals: Vec<StorageBatchModify<S>>,
) -> Pin<Box<dyn Future<Output = ProtocolResult<()>> + Send + 'async_trait>>where
S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
fn get_batch<'life0, 'async_trait, S>(
&'life0 self,
keys: Vec<<S as StorageSchema>::Key>,
) -> Pin<Box<dyn Future<Output = ProtocolResult<Vec<Option<<S as StorageSchema>::Value>>>> + Send + 'async_trait>>where
S: 'async_trait + StorageSchema,
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.