Struct yedb::client::YedbClient
source · [−]pub struct YedbClient {
pub path: String,
pub retries: u8,
pub timeout: Duration,
/* private fields */
}
Fields
path: String
retries: u8
timeout: Duration
Implementations
sourceimpl YedbClient
impl YedbClient
pub fn new(path: &str) -> Self
sourcepub fn call(&mut self, req: &JSONRpcRequest) -> Result<Value, Error>
pub fn call(&mut self, req: &JSONRpcRequest) -> Result<Value, Error>
Errors
Will return Err on failed calls
sourcepub fn key_list(&mut self, key: &str) -> Result<Vec<String>, Error>
pub fn key_list(&mut self, key: &str) -> Result<Vec<String>, Error>
Errors
Will return Err on failed calls
sourcepub fn key_list_all(&mut self, key: &str) -> Result<Vec<String>, Error>
pub fn key_list_all(&mut self, key: &str) -> Result<Vec<String>, Error>
Errors
Will return Err on failed calls
sourcepub fn key_get(&mut self, key: &str) -> Result<Value, Error>
pub fn key_get(&mut self, key: &str) -> Result<Value, Error>
Errors
Will return Err on failed calls
sourcepub fn key_get_field(&mut self, key: &str, field: &str) -> Result<Value, Error>
pub fn key_get_field(&mut self, key: &str, field: &str) -> Result<Value, Error>
Errors
Will return Err on failed calls
sourcepub fn key_get_recursive(
&mut self,
key: &str
) -> Result<Vec<(String, Value)>, Error>
pub fn key_get_recursive(
&mut self,
key: &str
) -> Result<Vec<(String, Value)>, Error>
Errors
Will return Err on failed calls
sourcepub fn key_copy(&mut self, key: &str, dst_key: &str) -> Result<(), Error>
pub fn key_copy(&mut self, key: &str, dst_key: &str) -> Result<(), Error>
Errors
Will return Err on failed calls
sourcepub fn key_rename(&mut self, key: &str, dst_key: &str) -> Result<(), Error>
pub fn key_rename(&mut self, key: &str, dst_key: &str) -> Result<(), Error>
Errors
Will return Err on failed calls
sourcepub fn key_explain(&mut self, key: &str) -> Result<KeyExplained, Error>
pub fn key_explain(&mut self, key: &str) -> Result<KeyExplained, Error>
Errors
Will return Err on failed calls
sourcepub fn key_set(&mut self, key: &str, value: Value) -> Result<(), Error>
pub fn key_set(&mut self, key: &str, value: Value) -> Result<(), Error>
Errors
Will return Err on failed calls
sourcepub fn key_set_field(
&mut self,
key: &str,
field: &str,
value: Value
) -> Result<(), Error>
pub fn key_set_field(
&mut self,
key: &str,
field: &str,
value: Value
) -> Result<(), Error>
Errors
Will return Err on failed calls
sourcepub fn key_delete_field(&mut self, key: &str, field: &str) -> Result<(), Error>
pub fn key_delete_field(&mut self, key: &str, field: &str) -> Result<(), Error>
Errors
Will return Err on failed calls
sourcepub fn key_increment(&mut self, key: &str) -> Result<i64, Error>
pub fn key_increment(&mut self, key: &str) -> Result<i64, Error>
Errors
Will return Err on failed calls
sourcepub fn key_decrement(&mut self, key: &str) -> Result<i64, Error>
pub fn key_decrement(&mut self, key: &str) -> Result<i64, Error>
Errors
Will return Err on failed calls
sourcepub fn key_delete(&mut self, key: &str) -> Result<(), Error>
pub fn key_delete(&mut self, key: &str) -> Result<(), Error>
Errors
Will return Err on failed calls
sourcepub fn key_delete_recursive(&mut self, key: &str) -> Result<(), Error>
pub fn key_delete_recursive(&mut self, key: &str) -> Result<(), Error>
Errors
Will return Err on failed calls
sourcepub fn server_set(&mut self, name: &str, value: Value) -> Result<(), Error>
pub fn server_set(&mut self, name: &str, value: Value) -> Result<(), Error>
Errors
Will return Err on failed calls
sourcepub fn repair(&mut self) -> Result<Vec<(String, bool)>, Error>
pub fn repair(&mut self) -> Result<Vec<(String, bool)>, Error>
Errors
Will return Err on failed calls
Auto Trait Implementations
impl RefUnwindSafe for YedbClient
impl Send for YedbClient
impl Sync for YedbClient
impl Unpin for YedbClient
impl UnwindSafe for YedbClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self