pub struct TemporalPatternDetector { /* private fields */ }Expand description
Temporal pattern detector Detects periodic access patterns
Implementations§
Source§impl TemporalPatternDetector
impl TemporalPatternDetector
Sourcepub fn record_access(&mut self, key: CacheKey, timestamp: DateTime<Utc>)
pub fn record_access(&mut self, key: CacheKey, timestamp: DateTime<Utc>)
Record an access
Sourcepub fn predict_next_access(&self, key: &CacheKey) -> Option<DateTime<Utc>>
pub fn predict_next_access(&self, key: &CacheKey) -> Option<DateTime<Utc>>
Predict next access time for a key
Sourcepub fn predict(&self, key: &CacheKey) -> Option<Prediction>
pub fn predict(&self, key: &CacheKey) -> Option<Prediction>
Get prediction with confidence
Auto Trait Implementations§
impl Freeze for TemporalPatternDetector
impl RefUnwindSafe for TemporalPatternDetector
impl Send for TemporalPatternDetector
impl Sync for TemporalPatternDetector
impl Unpin for TemporalPatternDetector
impl UnsafeUnpin for TemporalPatternDetector
impl UnwindSafe for TemporalPatternDetector
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