Skip to main content

Daemon

Struct Daemon 

Source
pub struct Daemon<K, V, S> {
Show 14 fields pub hasher: S, pub arena: Arena, pub t1: Arc<T1<K, V>>, pub t2: Arc<T2<K, V>>, pub cache: Arc<Cache<K, V>>, pub cmd_rx: Receiver<Command<K, V>>, pub hit_rx: Receiver<[usize; 64]>, pub epoch: Arc<AtomicU32>, pub duration: u32, pub admission: Arc<AdmissionFilter>, pub hit_accumulator: Vec<usize>, pub last_decay_epoch: u32, pub garbage_queue: Vec<(*mut Node<K, V>, usize)>, pub worker_states: Arc<[WorkerState]>,
}

Fields§

§hasher: S§arena: Arena§t1: Arc<T1<K, V>>§t2: Arc<T2<K, V>>§cache: Arc<Cache<K, V>>§cmd_rx: Receiver<Command<K, V>>§hit_rx: Receiver<[usize; 64]>§epoch: Arc<AtomicU32>§duration: u32§admission: Arc<AdmissionFilter>§hit_accumulator: Vec<usize>§last_decay_epoch: u32§garbage_queue: Vec<(*mut Node<K, V>, usize)>§worker_states: Arc<[WorkerState]>

Implementations§

Source§

impl<K, V, S> Daemon<K, V, S>
where K: Hash + Eq + Send + Sync + Clone + 'static, V: Send + Sync + Clone + 'static, S: BuildHasher + Clone + Send + 'static,

Source

pub fn new( hasher: S, capacity: usize, t1: Arc<T1<K, V>>, t2: Arc<T2<K, V>>, cache: Arc<Cache<K, V>>, cmd_rx: Receiver<Command<K, V>>, hit_rx: Receiver<[usize; 64]>, epoch: Arc<AtomicU32>, duration: u32, worker_states: Arc<[WorkerState]>, ) -> Self

Source

pub fn run(self)

Trait Implementations§

Source§

impl<K: Send, V: Send, S: Send> Send for Daemon<K, V, S>

Auto Trait Implementations§

§

impl<K, V, S> Freeze for Daemon<K, V, S>
where S: Freeze,

§

impl<K, V, S> RefUnwindSafe for Daemon<K, V, S>

§

impl<K, V, S> !Sync for Daemon<K, V, S>

§

impl<K, V, S> Unpin for Daemon<K, V, S>
where S: Unpin, K: Unpin, V: Unpin,

§

impl<K, V, S> UnsafeUnpin for Daemon<K, V, S>
where S: UnsafeUnpin,

§

impl<K, V, S> UnwindSafe for Daemon<K, V, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.