Struct salsa_2022::storage::Storage
source · [−]pub struct Storage<DB: HasJars> { /* private fields */ }
Expand description
The “storage” struct stores all the data for the jars. It is shared between the main database and any active snapshots.
Implementations
sourceimpl<DB> Storage<DB>where
DB: HasJars,
impl<DB> Storage<DB>where
DB: HasJars,
pub fn snapshot(&self) -> Storage<DB>where
DB: ParallelDatabase,
pub fn jars(&self) -> (&DB::Jars, &Runtime)
pub fn runtime(&self) -> &Runtime
pub fn runtime_mut(&mut self) -> &mut Runtime
sourcepub fn jars_mut(&mut self) -> (&mut DB::Jars, &mut Runtime)
pub fn jars_mut(&mut self) -> (&mut DB::Jars, &mut Runtime)
Gets mutable access to the jars. This will trigger a new revision
and it will also cancel any ongoing work in the current revision.
Any actual writes that occur to data in a jar should use
Runtime::report_tracked_write
.
pub fn ingredient(
&self,
ingredient_index: IngredientIndex
) -> &dyn Ingredient<DB>
Trait Implementations
Auto Trait Implementations
impl<DB> !RefUnwindSafe for Storage<DB>
impl<DB> Send for Storage<DB>where
<DB as HasJars>::Jars: Send + Sync,
impl<DB> !Sync for Storage<DB>
impl<DB> Unpin for Storage<DB>
impl<DB> !UnwindSafe for Storage<DB>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more