Skip to main content

RouteExpiryIndex

Trait RouteExpiryIndex 

Source
pub trait RouteExpiryIndex:
    Default
    + Clone
    + Debug
    + PartialEq
    + Eq {
    const INDEXED: bool;

    // Required methods
    fn invalidate(&self);
    fn insert(&self, row: usize, expiry: InstantMillis);
    fn update(&self, row: usize, expiry: InstantMillis);
    fn swap_remove(&self, removed: usize, last: usize);
    fn prefers_linear_cull(&self, row_count: usize, now: InstantMillis) -> bool;
    fn earliest_exact<F>(
        &self,
        row_count: usize,
        expiry_of: F,
    ) -> Option<InstantMillis>
       where F: FnMut(usize) -> InstantMillis;
    fn first_expired<F>(
        &self,
        row_count: usize,
        now: InstantMillis,
        expiry_of: F,
    ) -> Option<usize>
       where F: FnMut(usize) -> InstantMillis;
}

Required Associated Constants§

Required Methods§

Source

fn invalidate(&self)

Source

fn insert(&self, row: usize, expiry: InstantMillis)

Source

fn update(&self, row: usize, expiry: InstantMillis)

Source

fn swap_remove(&self, removed: usize, last: usize)

Source

fn prefers_linear_cull(&self, row_count: usize, now: InstantMillis) -> bool

Source

fn earliest_exact<F>( &self, row_count: usize, expiry_of: F, ) -> Option<InstantMillis>
where F: FnMut(usize) -> InstantMillis,

Source

fn first_expired<F>( &self, row_count: usize, now: InstantMillis, expiry_of: F, ) -> Option<usize>
where F: FnMut(usize) -> InstantMillis,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§