Struct rincon_client::cursor::types::Cursor [] [src]

pub struct Cursor<T> { /* fields omitted */ }

A temporary cursor for retrieving query results.

If the result set contains more documents than should be transferred in a single round-trip (i.e. as set via the batch_size attribute), the server will return the first few documents and create a temporary cursor. The cursor identifier will also be returned to the client. The server will put the cursor identifier in the id attribute of the response object. Furthermore, the has_more attribute of the response object will be set to true. This is an indication for the client that there are additional results to fetch from the server.

The cursor will automatically be destroyed on the server when the client has retrieved all documents from it. The client can also explicitly destroy the cursor at any earlier time using the DeleteCursor method.

Note: the server will also destroy abandoned cursors automatically after a certain server-controlled timeout to avoid resource leakage.

Methods

impl<T> Cursor<T>
[src]

[src]

Returns the id of the cursor created on the server.

[src]

Returns a slice of result documents (might be empty if query has no results).

[src]

Returns whether there are more results available for this cursor on the server.

[src]

Returns the total number of result documents available (only available if the query was executed with the count attribute set).

[src]

Returns whether the query result was served from the query cache or not.

If the query result is served from the query cache, the extra return attribute will not contain any stats sub-attribute and no profile sub-attribute.

[src]

Returns the statistics about the execution of data modification queries.

The stats will be None if the query is not a data modification query or the result is served from the query cache.

[src]

Returns warnings that occurred during query execution.

[src]

Unwraps this cursor into a tuple of id, count and result.

Trait Implementations

impl<T: Debug> Debug for Cursor<T>
[src]

[src]

Formats the value using the given formatter. Read more

impl<T: Clone> Clone for Cursor<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T> Send for Cursor<T> where
    T: Send

impl<T> Sync for Cursor<T> where
    T: Sync