Struct chill::Client [] [src]

pub struct Client {
    // some fields omitted
}

Manages all communication with a CouchDB server.

A Client communicates with the CouchDB server via actions. Each action abstracts a single HTTP request-response pair, such as to create a database (i.e., PUT /db) or read a document (i.e., GET /db/doc).

A Client communicates with exactly one CouchDB server, as specified by the URI set when the Client is constructed.

Methods

impl Client
[src]

fn new<U: IntoUrl>(server_url: U) -> Result<Self, Error>

Constructs a client for the given server.

fn create_database<'a, P>(&'a self, db_path: P) -> CreateDatabase<'a, HyperTransport, P> where P: IntoDatabasePath

Builds an action to create a database.

fn create_document<'a, C, P>(&'a self, db_path: P, content: &'a C) -> CreateDocument<'a, HyperTransport, P, C> where C: Serialize, P: IntoDatabasePath

Builds an action to create a document.

fn read_document<'a, P>(&'a self, doc_path: P) -> ReadDocument<'a, HyperTransport, P> where P: IntoDocumentPath

Builds an action to read a document.

fn update_document<'a>(&'a self, doc: &'a Document) -> UpdateDocument<'a, HyperTransport>

Builds an action to update a document.

fn delete_document<'a, P>(&'a self, doc_path: P, revision: &'a Revision) -> DeleteDocument<'a, HyperTransport, P> where P: IntoDocumentPath

Builds an action to delete a document.

fn execute_view<'a, P>(&'a self, view_path: P) -> ExecuteView<'a, HyperTransport, P, ()()> where P: IntoViewPath

Builds an action to execute a view.

Trait Implementations

impl Debug for Client
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.