pub struct GraphCache { /* private fields */ }Expand description
Graph caching and memoization system
Implementations§
Source§impl GraphCache
impl GraphCache
Sourcepub fn get_operation(&self, key: &str) -> Option<CachedResult>
pub fn get_operation(&self, key: &str) -> Option<CachedResult>
Get cached operation result
Sourcepub fn cache_operation(
&self,
key: String,
result: String,
computation_time: Duration,
)
pub fn cache_operation( &self, key: String, result: String, computation_time: Duration, )
Cache operation result
Sourcepub fn cache_subgraph(&self, key: String, graph: Arc<FxGraph>)
pub fn cache_subgraph(&self, key: String, graph: Arc<FxGraph>)
Cache subgraph
Sourcepub fn statistics(&self) -> CacheStatistics
pub fn statistics(&self) -> CacheStatistics
Get cache statistics
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for GraphCache
impl RefUnwindSafe for GraphCache
impl Send for GraphCache
impl Sync for GraphCache
impl Unpin for GraphCache
impl UnsafeUnpin for GraphCache
impl UnwindSafe for GraphCache
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> 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