pub struct Storage<Db> { /* private fields */ }Expand description
Concrete implementation of the Database trait with local state that can be used to drive computations.
Implementations§
Source§impl<Db: Database> Storage<Db>
impl<Db: Database> Storage<Db>
Sourcepub fn new(
event_callback: Option<Box<dyn Fn(Event) + Send + Sync + 'static>>,
) -> Self
pub fn new( event_callback: Option<Box<dyn Fn(Event) + Send + Sync + 'static>>, ) -> Self
Create a new database storage.
The event_callback function is invoked by the salsa runtime at various points during execution.
Sourcepub fn into_zalsa_handle(self) -> StorageHandle<Db>
pub fn into_zalsa_handle(self) -> StorageHandle<Db>
Convert this instance of Storage into a StorageHandle.
This will discard the local state of this Storage, thereby returning a value that
is both Sync and std::panic::UnwindSafe.
Trait Implementations§
Auto Trait Implementations§
impl<Db> !Freeze for Storage<Db>
impl<Db> RefUnwindSafe for Storage<Db>
impl<Db> Send for Storage<Db>
impl<Db> !Sync for Storage<Db>
impl<Db> Unpin for Storage<Db>
impl<Db> !UnwindSafe for Storage<Db>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more