pub struct ModuleLocker {
pub is_locker: bool,
pub ts: u64,
}Fields§
§is_locker: bool§ts: u64Trait Implementations§
Source§impl CacheAble for ModuleLocker
impl CacheAble for ModuleLocker
fn field() -> impl AsRef<str>
fn serialized_size_hint(&self) -> Option<usize>
fn clone_for_serialize(&self) -> Option<Self>
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
sync: &'life2 CacheService,
) -> Pin<Box<dyn Future<Output = Result<(), CacheError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn send_persistent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
sync: &'life2 CacheService,
) -> Pin<Box<dyn Future<Output = Result<(), CacheError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_persistent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
sync: &'life2 CacheService,
) -> Pin<Box<dyn Future<Output = Result<(), CacheError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store this value in the cache with no TTL (persistent until explicitly deleted).
fn send_with_ttl<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
sync: &'life2 CacheService,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), CacheError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_nx<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
sync: &'life2 CacheService,
ttl: Option<Duration>,
) -> Pin<Box<dyn Future<Output = Result<bool, CacheError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sync<'life0, 'life1, 'async_trait>(
id: &'life0 str,
sync: &'life1 CacheService,
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, CacheError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
id: &'life0 str,
sync: &'life1 CacheService,
) -> Pin<Box<dyn Future<Output = Result<(), CacheError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn scan<'life0, 'life1, 'async_trait>(
pattern_suffix: &'life0 str,
sync: &'life1 CacheService,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CacheError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cache_id(id: &str, cache: &CacheService) -> String
Source§impl Clone for ModuleLocker
impl Clone for ModuleLocker
Source§fn clone(&self) -> ModuleLocker
fn clone(&self) -> ModuleLocker
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 Debug for ModuleLocker
impl Debug for ModuleLocker
Source§impl Default for ModuleLocker
impl Default for ModuleLocker
Source§fn default() -> ModuleLocker
fn default() -> ModuleLocker
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModuleLocker
impl<'de> Deserialize<'de> for ModuleLocker
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModuleLocker
impl RefUnwindSafe for ModuleLocker
impl Send for ModuleLocker
impl Sync for ModuleLocker
impl Unpin for ModuleLocker
impl UnsafeUnpin for ModuleLocker
impl UnwindSafe for ModuleLocker
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more