pub struct LocalControlPlane { /* private fields */ }Expand description
Single-node control plane: commands are applied directly to the local redb state machine (no consensus).
Implementations§
Source§impl LocalControlPlane
impl LocalControlPlane
pub fn new(sm: Arc<StateMachine>) -> Self
Trait Implementations§
Source§impl Clone for LocalControlPlane
impl Clone for LocalControlPlane
Source§fn clone(&self) -> LocalControlPlane
fn clone(&self) -> LocalControlPlane
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ControlPlane for LocalControlPlane
impl ControlPlane for LocalControlPlane
fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
value: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), ControlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, ControlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), ControlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn cas<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
expect: Option<&'life2 [u8]>,
value: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<bool, ControlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn cas<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
expect: Option<&'life2 [u8]>,
value: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<bool, ControlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Compare-and-swap; returns whether it succeeded.
Source§fn acquire_lock<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
holder: &'life2 str,
ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, ControlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn acquire_lock<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
holder: &'life2 str,
ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, ControlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Acquire a lock; returns a fencing token on success.
fn renew_lock<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
holder: &'life2 str,
ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, ControlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn release_lock<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
holder: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), ControlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for LocalControlPlane
impl !UnwindSafe for LocalControlPlane
impl Freeze for LocalControlPlane
impl Send for LocalControlPlane
impl Sync for LocalControlPlane
impl Unpin for LocalControlPlane
impl UnsafeUnpin for LocalControlPlane
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more