Trait Pipe

Source
pub trait Pipe:
    Send
    + Sync
    + 'static {
    type Key;
    type Value;

    // Required methods
    fn is_enabled(&self) -> bool;
    fn send(&self, piece: Piece<Self::Key, Self::Value>);
}
Expand description

Pipe is used to notify disk cache to cache entries from the in-memory cache.

Required Associated Types§

Source

type Key

Type of the key of the record.

Source

type Value

Type of the value of the record.

Required Methods§

Source

fn is_enabled(&self) -> bool

Decide whether to send evicted entry to pipe.

Source

fn send(&self, piece: Piece<Self::Key, Self::Value>)

Send the piece to the disk cache.

Implementors§