Struct yedb::Database[][src]

pub struct Database {
    pub auto_repair: bool,
    pub auto_flush: bool,
    pub write_modified_only: bool,
    pub timeout: Duration,
    pub lock_ex: bool,
    pub auto_bak: u64,
    // some fields omitted
}

Fields

auto_repair: boolauto_flush: boolwrite_modified_only: booltimeout: Durationlock_ex: boolauto_bak: u64

Implementations

impl Database[src]

pub fn new() -> Self[src]

pub fn is_open(&self) -> bool[src]

pub fn set_default_fmt(
    &mut self,
    fmt: &str,
    checksums: bool
) -> Result<(), Error>
[src]

pub fn set_db_path(&mut self, path: &str) -> Result<(), Error>[src]

pub fn set_cache_size(&mut self, size: usize)[src]

pub fn set_lock_path(&mut self, path: &str) -> Result<(), Error>[src]

pub fn open(&mut self) -> Result<ServerInfo, Error>[src]

pub fn close(&mut self) -> Result<(), Error>[src]

pub fn key_load_from_serialized(
    &mut self,
    data: &Vec<Value>
) -> Result<(), Error>
[src]

pub fn info(&self) -> Result<DBInfo, Error>[src]

pub fn server_set(&mut self, name: &str, value: Value) -> Result<(), Error>[src]

pub fn purge(&mut self) -> Result<Vec<String>, Error>[src]

pub fn safe_purge(&mut self) -> Result<(), Error>[src]

pub fn purge_cache(&mut self) -> Result<(), Error>[src]

pub fn key_delete(&mut self, key: &str) -> Result<(), Error>[src]

pub fn key_delete_recursive(&mut self, key: &str) -> Result<(), Error>[src]

pub fn key_explain(&mut self, key: &str) -> Result<KeyExplained, Error>[src]

pub fn key_get(&mut self, key: &str) -> Result<Value, Error>[src]

pub fn key_get_recursive(
    &mut self,
    key: &str
) -> Result<Vec<(String, Value)>, Error>
[src]

pub fn key_get_field(&mut self, key: &str, field: &str) -> Result<Value, Error>[src]

Get key field

field may contain a simple path (e.g. field/subfield/subsubfield)

pub fn key_set_field(
    &mut self,
    key: &str,
    field: &str,
    value: Value
) -> Result<(), Error>
[src]

Set key field

field may contain a simple path (e.g. field/subfield/subsubfield)

pub fn key_delete_field(&mut self, key: &str, field: &str) -> Result<(), Error>[src]

Delete key field

field may contain a simple path (e.g. field/subfield/subsubfield)

pub fn key_set(&mut self, key: &str, value: Value) -> Result<(), Error>[src]

pub fn key_list(&mut self, key: &str) -> Result<Vec<String>, Error>[src]

pub fn key_list_all(&mut self, key: &str) -> Result<Vec<String>, Error>[src]

pub fn key_copy(&mut self, key: &str, dst_key: &str) -> Result<(), Error>[src]

pub fn key_increment(&mut self, key: &str) -> Result<i64, Error>[src]

pub fn key_decrement(&mut self, key: &str) -> Result<i64, Error>[src]

pub fn key_rename(&mut self, key: &str, dst_key: &str) -> Result<(), Error>[src]

pub fn check(&mut self) -> Result<Vec<String>, Error>[src]

pub fn repair(&mut self) -> Result<Vec<(String, bool)>, Error>[src]

pub fn key_dump(&mut self, key: &str) -> Result<Vec<(String, Value)>, Error>[src]

pub fn key_load(&mut self, data: Vec<(String, Value)>) -> Result<(), Error>[src]

Trait Implementations

impl Drop for Database[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.