[][src]Struct gluon_salsa::Storage

pub struct Storage<DB: DatabaseStorageTypes> { /* fields omitted */ }

Stores the cached results and dependency information for all the queries defined on your salsa database. Also embeds a Runtime which is used to manage query execution. Every database must include a storage: Storage<Self> field.

Implementations

impl<DB: DatabaseStorageTypes> Storage<DB>[src]

pub fn salsa_runtime(&self) -> &Runtime[src]

Gives access to the underlying salsa runtime.

pub fn salsa_runtime_mut(&mut self) -> &mut Runtime[src]

Gives access to the underlying salsa runtime.

pub fn query_store(&self) -> &DB::DatabaseStorage[src]

Access the query storage tables. Not meant to be used directly by end users.

pub fn snapshot(&self) -> Self[src]

Returns a "snapshotted" storage, suitable for use in a forked database. This snapshot hold a read-lock on the global state, which means that any attempt to set an input will block until the forked runtime is dropped. See ParallelDatabase::snapshot for more information.

Warning. This second handle is intended to be used from a separate thread. Using two database handles from the same thread can lead to deadlock.

pub fn fork(&self, forker: ForkState) -> Self[src]

Returns a "forked" runtime, suitable to call concurrent queries.

Trait Implementations

impl<DB: DatabaseStorageTypes> Default for Storage<DB>[src]

Auto Trait Implementations

impl<DB> RefUnwindSafe for Storage<DB> where
    <DB as DatabaseStorageTypes>::DatabaseStorage: RefUnwindSafe

impl<DB> Send for Storage<DB> where
    <DB as DatabaseStorageTypes>::DatabaseStorage: Send + Sync

impl<DB> !Sync for Storage<DB>

impl<DB> Unpin for Storage<DB>

impl<DB> UnwindSafe for Storage<DB> where
    <DB as DatabaseStorageTypes>::DatabaseStorage: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.