pub struct FullContext { /* private fields */ }Expand description
Full context - evictable, created by bind operations.
Implementations§
Source§impl FullContext
impl FullContext
Sourcepub fn new(
start: Tock,
end: Tock,
values: ValueVec,
space: Space,
time_taken: Time,
replayer: Rc<Replayer>,
dependencies: TockVec,
) -> Rc<Self>
pub fn new( start: Tock, end: Tock, values: ValueVec, space: Space, time_taken: Time, replayer: Rc<Replayer>, dependencies: TockVec, ) -> Rc<Self>
Create a new FullContext.
Note: Backedge registration should be done by the caller after creation but before inserting into akasha. This matches the C++ design where backedge registration happens in the constructor (before the context is visible in akasha).
pub fn set_pool_index(&self, idx: usize)
pub fn clear_pool_index(&self)
pub fn pool_index(&self) -> Option<usize>
Sourcepub fn cost(&self, metric: fn(Time, Time, Space) -> Cost) -> Cost
pub fn cost(&self, metric: fn(Time, Time, Space) -> Cost) -> Cost
Compute eviction cost using metric function.
pub fn space(&self) -> Space
pub fn dependencies(&self) -> &[Tock]
Sourcepub fn time_taken(&self) -> Time
pub fn time_taken(&self) -> Time
Get the time taken for this computation (used for cost calculation).
Sourcepub fn backward_uf(&self) -> &UF
pub fn backward_uf(&self) -> &UF
Get the backward UF for this context.
Sourcepub fn forward_uf(&self) -> &UF
pub fn forward_uf(&self) -> &UF
Get the forward UF for this context.
Trait Implementations§
Source§impl ContextNode for FullContext
impl ContextNode for FullContext
fn start_tock(&self) -> Tock
fn end_tock(&self) -> Tock
fn evictable(&self) -> bool
fn evict(&self)
fn evict_at(&self, idx: usize)
fn accessed(&self)
fn get_replayer(&self) -> Option<Rc<Replayer>>
fn get_value_at(&self, idx: usize) -> Option<Rc<dyn EZombieNode>>
Source§fn get_forward_uf(&self) -> Option<UF>
fn get_forward_uf(&self) -> Option<UF>
Get forward_uf for backedge registration. Returns None for RootContext.
Auto Trait Implementations§
impl !Freeze for FullContext
impl !RefUnwindSafe for FullContext
impl !Send for FullContext
impl !Sync for FullContext
impl Unpin for FullContext
impl !UnwindSafe for FullContext
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