pub struct ValkeyExecutionGuard { /* private fields */ }Implementations§
Source§impl ValkeyExecutionGuard
impl ValkeyExecutionGuard
pub async fn new( url: impl AsRef<str>, lease_config: ValkeyLeaseConfig, ) -> Result<Self, ExecutionGuardError>
pub async fn with_prefix( url: impl AsRef<str>, key_prefix: impl Into<String>, lease_config: ValkeyLeaseConfig, ) -> Result<Self, ExecutionGuardError>
Trait Implementations§
Source§impl Clone for ValkeyExecutionGuard
impl Clone for ValkeyExecutionGuard
Source§fn clone(&self) -> ValkeyExecutionGuard
fn clone(&self) -> ValkeyExecutionGuard
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValkeyExecutionGuard
impl Debug for ValkeyExecutionGuard
Source§impl ExecutionGuard for ValkeyExecutionGuard
impl ExecutionGuard for ValkeyExecutionGuard
type Error = ValkeyExecutionGuardError
async fn acquire( &self, slot: ExecutionSlot, ) -> Result<ExecutionGuardAcquire, Self::Error>
async fn renew( &self, lease: &ExecutionLease, ) -> Result<ExecutionGuardRenewal, Self::Error>
async fn release(&self, lease: &ExecutionLease) -> Result<(), Self::Error>
fn classify_error(error: &Self::Error) -> ExecutionGuardErrorKindwhere
Self: Sized,
fn renew_interval(&self, _lease: &ExecutionLease) -> Option<Duration>
Auto Trait Implementations§
impl Freeze for ValkeyExecutionGuard
impl !RefUnwindSafe for ValkeyExecutionGuard
impl Send for ValkeyExecutionGuard
impl Sync for ValkeyExecutionGuard
impl Unpin for ValkeyExecutionGuard
impl UnsafeUnpin for ValkeyExecutionGuard
impl !UnwindSafe for ValkeyExecutionGuard
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