pub trait BackendHandler: TargetLockedRemote {
// Provided methods
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Vec<u8>>, NetworkError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn remove_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Vec<u8>>, NetworkError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Contains a trait for persisting application-level data in a K,V store that is unique for this particular connection
Provided Methods§
sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets a value from the backend
sourcefn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Removes a value from the backend, returning the previous value
sourcefn set<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, NetworkError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stores a value in the backend, either creating or overwriting any pre-existing value