pub trait ClusterKv:
Send
+ Sync
+ 'static {
// Required methods
fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: String,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn read_from<'life0, 'life1, 'async_trait>(
&'life0 self,
who: NodeId,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn scan<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Vec<(NodeId, String)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn scan_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Vec<(NodeId, String, String)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn supports_subscription_routing(&self) -> bool { ... }
}Expand description
Gossip-KV seam.
Required Methods§
Sourcefn write<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: String,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: String,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write value to this instance’s key slot (overwrites).
Sourcefn read_from<'life0, 'life1, 'async_trait>(
&'life0 self,
who: NodeId,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_from<'life0, 'life1, 'async_trait>(
&'life0 self,
who: NodeId,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read key from who’s slot.
Sourcefn scan<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Vec<(NodeId, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn scan<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Vec<(NodeId, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Every visible instance’s value for key.
Sourcefn scan_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Vec<(NodeId, String, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn scan_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Vec<(NodeId, String, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Every visible instance’s key-value pairs where the key starts with the given prefix.
Provided Methods§
Sourcefn supports_subscription_routing(&self) -> bool
fn supports_subscription_routing(&self) -> bool
Whether the backend supports the subscription-interest scan the
distributed SUBSCRIBE router needs (object stores return false).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".