Struct sofa::Document[][src]

pub struct Document {
    pub _id: DocumentId,
    pub _rev: String,
    // some fields omitted
}

Document abstracts the handling of JSON values and provides direct access and casting to the fields of your documents You can get access to the fields via the implementation of the Index and IndexMut traits

Fields

Document ID, provided by CouchDB

Document Revision, provided by CouchDB, helps negotiating conflicts

Methods

impl Document
[src]

Returns all document's keys

Returns raw JSON data from document

Merges this document with a raw JSON value, useful to update data with a payload

Recursively populates field (must be an array of IDs from another database) with provided database documents

Trait Implementations

impl PartialEq for Document
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Document
[src]

Formats the value using the given formatter. Read more

impl Clone for Document
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<I> Index<I> for Document where
    I: Index
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<I> IndexMut<I> for Document where
    I: Index
[src]

Performs the mutable indexing (container[index]) operation.

Auto Trait Implementations

impl Send for Document

impl Sync for Document