Struct couchdb::action::HeadDocument [] [src]

pub struct HeadDocument<'a, P> where P: IntoDocumentPath {
    // some fields omitted
}

Action to check whether a document exists.

Return

This action returns an Option type. The return value is None if the action specifies a revision and the document hasn't been modified since that revision. Otherwise, the return value is Some.

Errors

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

Methods

impl<'a, P: IntoDocumentPath> HeadDocument<'a, P>

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

Sets the If-None-Match header.

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

Sends the action request and waits for the response.