Struct couchdb::action::PutDocument [] [src]

pub struct PutDocument<'a, P: IntoDocumentPath, T: 'a + Serialize> {
    // some fields omitted
}

Action to create or update a document.

Return

This action returns the document's new revision.

Errors

The following are some of the errors that may occur as a result of executing this action:

Methods

impl<'a, P: IntoDocumentPath, T: 'a + Serialize> PutDocument<'a, P, T>

fn if_match(self, rev: &'a Revision) -> Self

Sets the If-Match header.

fn run(self) -> Result<Revision, Error>

Sends the action request and waits for the response.