pub struct DbHandle<'db, S> { /* private fields */ }Expand description
A handle to the database during some operation.
This wraps calls to the Db so that any get calls
will be automatically registered as dependencies of
the current operation.
Implementations§
Source§impl<'db, S> DbHandle<'db, S>
impl<'db, S> DbHandle<'db, S>
Sourcepub fn storage_mut(&mut self) -> &mut S
pub fn storage_mut(&mut self) -> &mut S
Retrieve a mutable reference to the internal database’s storage.
Note that any mutations made to the storage using this are not tracked by the database! Using this incorrectly may break correctness!
Source§impl<'db, S: Storage> DbHandle<'db, S>
impl<'db, S: Storage> DbHandle<'db, S>
pub fn get<C: OutputType + ComputationId>(&mut self, compute: C) -> &C::Outputwhere
S: StorageFor<C>,
Auto Trait Implementations§
impl<'db, S> Freeze for DbHandle<'db, S>
impl<'db, S> RefUnwindSafe for DbHandle<'db, S>where
S: RefUnwindSafe,
impl<'db, S> Send for DbHandle<'db, S>where
S: Send,
impl<'db, S> Sync for DbHandle<'db, S>where
S: Sync,
impl<'db, S> Unpin for DbHandle<'db, S>
impl<'db, S> !UnwindSafe for DbHandle<'db, S>
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