pub struct AvailabilityIndex { /* private fields */ }Implementations§
Source§impl AvailabilityIndex
impl AvailabilityIndex
pub const fn fixed_capacity_bytes() -> u64
pub fn new() -> Self
pub fn with_ttl(ttl: Duration) -> Self
pub fn get(&self, message_id: &MessageId<'_>) -> Option<CachedArticle>
pub fn get_request_message_id(&self, message_id: &str) -> Option<CachedArticle>
pub fn record_backend_missing( &self, message_id: &MessageId<'_>, backend_id: BackendId, )
pub fn load_from_path(&self, path: &Path) -> Result<bool>
pub fn save_to_path(&self, path: &Path) -> Result<()>
pub const fn capacity_bytes(&self) -> u64
pub fn entry_count(&self) -> u64
pub fn used_bytes(&self) -> u64
pub fn hit_rate(&self) -> f64
pub fn evictions(&self) -> u64
Trait Implementations§
Source§impl CacheStatsProvider for AvailabilityIndex
impl CacheStatsProvider for AvailabilityIndex
Source§fn display_stats(&self) -> CacheDisplayStats
fn display_stats(&self) -> CacheDisplayStats
Get statistics for TUI display
Source§impl Debug for AvailabilityIndex
impl Debug for AvailabilityIndex
Auto Trait Implementations§
impl !Freeze for AvailabilityIndex
impl RefUnwindSafe for AvailabilityIndex
impl Send for AvailabilityIndex
impl Sync for AvailabilityIndex
impl Unpin for AvailabilityIndex
impl UnsafeUnpin for AvailabilityIndex
impl UnwindSafe for AvailabilityIndex
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> 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