pub struct Db<F> { /* private fields */ }Implementations§
Source§impl<F: Run + Copy + Eq + Hash + Clone> Db<F>
impl<F: Run + Copy + Eq + Hash + Clone> Db<F>
Sourcepub fn get<'a, T: 'static>(&'a mut self, compute: F) -> &'a Twhere
F: Debug,
pub fn get<'a, T: 'static>(&'a mut self, compute: F) -> &'a Twhere
F: Debug,
Retrieves the up to date value for the given computation, re-running any dependencies as necessary.
This function can panic if the dynamic type of the value returned by compute.run(..) is not T.
pub fn update_cell(&mut self, cell_id: Cell)where
F: Debug,
pub fn cell(&mut self, input: F) -> Cell
Sourcepub fn update_input(&mut self, input: F, new_value: Value)where
F: Debug,
pub fn update_input(&mut self, input: F, new_value: Value)where
F: Debug,
Updates an input with a new value
May panic in Debug mode if the input is not an input - ie. it has at least 1 dependency. Note that this step is skipped when compiling in Release mode.
Auto Trait Implementations§
impl<F> Freeze for Db<F>
impl<F> !RefUnwindSafe for Db<F>
impl<F> !Send for Db<F>
impl<F> !Sync for Db<F>
impl<F> Unpin for Db<F>where
F: Unpin,
impl<F> !UnwindSafe for Db<F>
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