pub struct InterBarFeatureCache { /* private fields */ }Expand description
LRU cache for inter-bar feature computation results
Task #144 Phase 4: Caches feature computation to reduce latency in streaming scenarios with repeated window patterns.
Typical hit rate: 15-30% for streaming (depends on market conditions)
Implementations§
Source§impl InterBarFeatureCache
impl InterBarFeatureCache
Sourcepub fn with_capacity(capacity: u64) -> Self
pub fn with_capacity(capacity: u64) -> Self
Create with custom capacity
Sourcepub fn get(&self, key: &InterBarCacheKey) -> Option<InterBarFeatures>
pub fn get(&self, key: &InterBarCacheKey) -> Option<InterBarFeatures>
Get cached features if key matches
Sourcepub fn insert(&self, key: InterBarCacheKey, features: InterBarFeatures)
pub fn insert(&self, key: InterBarCacheKey, features: InterBarFeatures)
Insert computed features into cache
Trait Implementations§
Source§impl Debug for InterBarFeatureCache
impl Debug for InterBarFeatureCache
Auto Trait Implementations§
impl Freeze for InterBarFeatureCache
impl !RefUnwindSafe for InterBarFeatureCache
impl Send for InterBarFeatureCache
impl Sync for InterBarFeatureCache
impl Unpin for InterBarFeatureCache
impl UnsafeUnpin for InterBarFeatureCache
impl !UnwindSafe for InterBarFeatureCache
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