Struct gauc::client::Client
[−]
[src]
pub struct Client { pub opts: CreateSt, pub instance: Instance, pub uri: String, }
Fields
opts: CreateSt
instance: Instance
uri: String
Methods
impl Client
[src]
fn connect(uri: &str) -> Result<Client, String>
[src]
fn add<'a, F>(
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
[src]
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
Will cause the operation to fail if the key already exists in the cluster.
fn add_sync(
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
[src]
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
fn append<'a, F>(
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
[src]
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
Rather than setting the contents of the entire document, take the value specified in value and append it to the existing bytes in the value.
fn append_sync(
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
[src]
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
fn get<'a, F>(&'a mut self, key: &str, callback: F) -> &Client where
F: Fn(OperationResultGet) + 'static,
[src]
F: Fn(OperationResultGet) + 'static,
Get document from database
fn get_sync(&mut self, key: &str) -> OperationResultGet
[src]
fn prepend<'a, F>(
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
[src]
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
Like append, but prepends the new value to the existing value.
fn prepend_sync(
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
[src]
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
fn remove<'a, F>(&'a mut self, key: &str, callback: F) -> &Client where
F: Fn(OperationResultRemove) + 'static,
[src]
F: Fn(OperationResultRemove) + 'static,
Remove document from database
fn remove_sync(&mut self, key: &str) -> OperationResultRemove
[src]
fn replace<'a, F>(
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
[src]
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
Will cause the operation to fail unless the key already exists in the cluster.
fn replace_sync(
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
[src]
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
fn set<'a, F>(
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
[src]
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
Unconditionally store the item in the cluster
fn set_sync(
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
[src]
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
fn store<'a, F>(
&'a mut self,
key: &str,
value: &str,
operation: Operation,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
[src]
&'a mut self,
key: &str,
value: &str,
operation: Operation,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
Store document in database
fn store_sync(
&mut self,
key: &str,
value: &str,
operation: Operation,
cas: u64,
exptime: u32
) -> OperationResultStore
[src]
&mut self,
key: &str,
value: &str,
operation: Operation,
cas: u64,
exptime: u32
) -> OperationResultStore
fn upsert<'a, F>(
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
[src]
&'a mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32,
callback: F
) -> &Client where
F: Fn(OperationResultStore) + 'static,
Behaviorally it is identical to set in that it will make the server unconditionally store the item, whether it exists or not.
fn upsert_sync(
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
[src]
&mut self,
key: &str,
value: &str,
cas: u64,
exptime: u32
) -> OperationResultStore
fn view_query<'a, F>(
&'a mut self,
ddoc: &str,
view: &str,
callback: F
) -> &Client where
F: Fn(OperationResultViewQuery) + 'static,
[src]
&'a mut self,
ddoc: &str,
view: &str,
callback: F
) -> &Client where
F: Fn(OperationResultViewQuery) + 'static,
Store document in database
fn view_query_sync(
&mut self,
ddoc: &str,
view: &str
) -> OperationResultViewQuery
[src]
&mut self,
ddoc: &str,
view: &str
) -> OperationResultViewQuery
Trait Implementations
impl Debug for Client
[src]
impl Clone for Client
[src]
fn clone(&self) -> Client
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more