pub struct Store { /* private fields */ }

Implementations

Returns a Collection with the provided name.

Returns an object that lets you fetch or observe the collections in the store.

Allows you to group multiple operations together that affect multiple documents, potentially across multiple collections, without auto-committing on each operation.

At the end of the batch of operations, either batch.commit_changes() or batch.revert_changes() must be called.

Example
ditto.store().with_batched_write(|batch| {
    let mut foo_coll = batch.collection("foo");
    foo_coll.find...().remove();
    let mut bar_coll = batch.collection("bar");
    // Expensive multi-mutation op:
    for _ in 0 .. 10_000 {
        let doc = ...;
        bar_coll.insert(doc, None, false);
    }
    // At this point, we must say whether we commit or revert
    // these changes:
    batch.commit_changes()
})

Returns a list of the names of collections in the store.

Returns a hash representing the current version of the given queries. When a document matching such queries gets mutated, the hash will change as well.

Please note that the hash depends on how queries are constructed, so you should make sure to always compare hashes generated with the same set of queries.

Returns a sequence of English words representing the current version of the given queries. When a document matching such queries gets mutated, the words will change as well.

Please note that the resulting sequence of words depends on how queries are constructed, so you should make sure to always compare hashes generated with the same set of queries.

Returns a Timeseries with the provided name.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts to T by calling Into<T>::into.

Tries to convert to T by calling TryInto<T>::try_into.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.