Struct dittolive_ditto::store::collection::Collection[][src]

pub struct Collection { /* fields omitted */ }

Implementations

Generates a DittoPendingCursorOperation that can be used to find all documents in the collection at a point in time or you can chain a call to observe, observeLocal, or subscribe if you want to get updates about documents in the collection over time. It can also be used to update, remove or evict documents.

Generates a DittoPendingCursorOperation with the provided query that can be used to find the documents matching the query at a point in time or you can chain a call to observe, observeLocal, or subscribe if you want to get updates about documents matching the query as they occur. It can also be used to update, remove, or evict documents.

Generates a DittoPendingCursorOperation with the provided query and query arguments that can be used to find the documents matching the query at a point in time or you can chain a call to observe, observeLocal, or subscribe if you want to get updates about documents matching the query as they occur. It can also be used to update, remove, or evict documents.

This is the recommended function to use when performing queries on a collection if you have any dynamic data included in the query string. It allows you to provide a query string with placeholders, in the form of $args.my_arg_name, along with an accompanying dictionary of arguments, in the form of { "my_arg_name": "some value" }, and the placeholders will be appropriately replaced by the matching provided arguments from the dictionary. This includes handling things like wrapping strings in quotation marks and arrays in square brackets, for example.

Generates a DittoPendingIDSpecificOperation with the provided document ID that can be used to find the document at a point in time or you can chain a call to observe, observeLocal, or subscribe if you want to get updates about the document over time. It can also be used to update, remove or evict the document.

Inserts a new document into the collection and returns its assigned ID. A DocumentId may be provided or if None, a document ID will be auto-generated

Inserts a new document into the collection and returns its assigned ID. A DocumentId may be provided or if None, a document ID will be auto-generated

Creates a new attachment, which can then be inserted into a document.

The file residing at the provided path will be copied into the Ditto’s store. The DittoAttachment object that is returned is what you can then use to insert an attachment into a document.

You can provide metadata about the attachment, which will be replicated to other peers alongside the file attachment.

Below is a snippet to show how you can use the new_attachment functionality to insert an attachment into a document.

Fetch the attachment corresponding to the provided attachment token.

  • onchange - A closure that will be called when the status of the request to fetch the attachment has changed. If the attachment is already available then this will be called almost immediately with a completed status value.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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

Performs the conversion.

Performs the conversion.

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)

recently added

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.