pub struct HotView { /* private fields */ }Implementations§
Source§impl HotView
impl HotView
pub fn new() -> HotView
Sourcepub fn apply(&mut self, record: &EventRecord) -> Result<(), StorageError>
pub fn apply(&mut self, record: &EventRecord) -> Result<(), StorageError>
Folds one record in. Records at or below a Run’s last seq are ignored, so re-feeding a segment is free of consequence.
Sourcepub fn runs(&self) -> impl Iterator<Item = (&RunId, &RunHot)>
pub fn runs(&self) -> impl Iterator<Item = (&RunId, &RunHot)>
Every active run and the RECENT_FROZEN frozen runs with the
latest last_seq: what a city view carries. Iteration is in RunId
order — the same order on every process, so a rendered list never
reshuffles between restarts.
pub fn get(&self, run: &RunId) -> Option<&RunHot>
Sourcepub fn was_evicted(&self, run: &RunId) -> bool
pub fn was_evicted(&self, run: &RunId) -> bool
Whether run froze and was pushed out of the view. Its records
are still in the Ledger; a reader that needs them goes there.
pub fn active_count(&self) -> u64
pub fn frozen_count(&self) -> u64
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HotView
impl<'de> Deserialize<'de> for HotView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HotView
impl RefUnwindSafe for HotView
impl Send for HotView
impl Sync for HotView
impl Unpin for HotView
impl UnsafeUnpin for HotView
impl UnwindSafe for HotView
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