pub struct LocalRelationCache { /* private fields */ }Expand description
Local in-process relation definition cache.
Implementations§
Source§impl LocalRelationCache
impl LocalRelationCache
Sourcepub fn new(config: LocalRelationCacheConfig) -> Self
pub fn new(config: LocalRelationCacheConfig) -> Self
Creates a local in-process relation definition cache.
Trait Implementations§
Source§impl Clone for LocalRelationCache
impl Clone for LocalRelationCache
Source§fn clone(&self) -> LocalRelationCache
fn clone(&self) -> LocalRelationCache
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 LocalRelationCache
impl Debug for LocalRelationCache
Source§impl RelationCache for LocalRelationCache
impl RelationCache for LocalRelationCache
Source§fn get_by_id<'life0, 'async_trait>(
&'life0 self,
relation_id: RelationId,
) -> Pin<Box<dyn Future<Output = Option<RelationDefinition>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_by_id<'life0, 'async_trait>(
&'life0 self,
relation_id: RelationId,
) -> Pin<Box<dyn Future<Output = Option<RelationDefinition>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets a cached relation by stable id.
Source§fn get_by_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 RelationKey,
) -> Pin<Box<dyn Future<Output = Option<RelationDefinition>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_by_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 RelationKey,
) -> Pin<Box<dyn Future<Output = Option<RelationDefinition>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets a cached relation by natural relation key.
Source§fn store<'life0, 'life1, 'async_trait>(
&'life0 self,
relation: &'life1 RelationDefinition,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store<'life0, 'life1, 'async_trait>(
&'life0 self,
relation: &'life1 RelationDefinition,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stores or refreshes a relation definition.
Source§fn remove_by_id<'life0, 'async_trait>(
&'life0 self,
relation_id: RelationId,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_by_id<'life0, 'async_trait>(
&'life0 self,
relation_id: RelationId,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Removes cached entries for a relation id.
Auto Trait Implementations§
impl Freeze for LocalRelationCache
impl RefUnwindSafe for LocalRelationCache
impl Send for LocalRelationCache
impl Sync for LocalRelationCache
impl Unpin for LocalRelationCache
impl UnsafeUnpin for LocalRelationCache
impl UnwindSafe for LocalRelationCache
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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