pub trait BindingSequenceStore: Send + Sync {
// Required method
fn next_binding_seq<'life0, 'life1, 'async_trait>(
&'life0 self,
device: &'life1 DeviceId,
now: i64,
) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Origin-side per-device binding sequence. Keyed by device alone: a device id re-bound to another user still supersedes its previous binding, which is what an edge must see when a node changes hands.
Required Methods§
Sourcefn next_binding_seq<'life0, 'life1, 'async_trait>(
&'life0 self,
device: &'life1 DeviceId,
now: i64,
) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn next_binding_seq<'life0, 'life1, 'async_trait>(
&'life0 self,
device: &'life1 DeviceId,
now: i64,
) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Advance device’s sequence by next_binding_seq and return it, as
one atomic step: two concurrent mints for one device never share a
sequence.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".