pub trait ChannelBindingStore: Send + Sync {
// Required methods
fn put_binding<'life0, 'async_trait>(
&'life0 self,
binding: ChannelBinding,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_binding<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelBinding>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_bindings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ChannelBinding>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put_request<'life0, 'async_trait>(
&'life0 self,
request: ChannelPairingRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
channel: &'life1 str,
account: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelPairingRequest>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn take_request<'life0, 'life1, 'async_trait>(
&'life0 self,
code_hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelPairingRequest>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_requests<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ChannelPairingRequest>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn prune_requests<'life0, 'async_trait>(
&'life0 self,
before: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Where paired chat accounts and their pairing requests are kept (spec 3.3 §10 K1), on the
backends the kernel’s other stores use, with one conformance suite
(channel_binding_store_conformance_tests!, feature conformance).
Required Methods§
Sourcefn put_binding<'life0, 'async_trait>(
&'life0 self,
binding: ChannelBinding,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_binding<'life0, 'async_trait>(
&'life0 self,
binding: ChannelBinding,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Keeps a binding, replacing the one with the same id.
Sourcefn get_binding<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_binding<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The binding id, removed ones included.
Sourcefn list_bindings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ChannelBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_bindings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ChannelBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Every binding, oldest pairing first, then by id.
Sourcefn put_request<'life0, 'async_trait>(
&'life0 self,
request: ChannelPairingRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_request<'life0, 'async_trait>(
&'life0 self,
request: ChannelPairingRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Keeps an account’s request, replacing that account’s earlier one.
Sourcefn get_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
channel: &'life1 str,
account: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelPairingRequest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
channel: &'life1 str,
account: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelPairingRequest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The request of account on channel, expired or not.
Sourcefn take_request<'life0, 'life1, 'async_trait>(
&'life0 self,
code_hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelPairingRequest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn take_request<'life0, 'life1, 'async_trait>(
&'life0 self,
code_hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ChannelPairingRequest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Removes and returns the request whose code is hashed code_hash, expired or not; two
takes of one code take it once.
Sourcefn list_requests<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ChannelPairingRequest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_requests<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ChannelPairingRequest>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Every request, oldest first, then by channel and account.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".