[−][src]Struct elektra::kdb::KDB
General methods to access the Key database. For example usage see the Readme.
Methods
impl KDB
[src]
pub fn open<'a>() -> Result<Self, KDBError<'a>>
[src]
Opens the session with the Key database.
pub fn get<'a>(
&mut self,
keyset: &mut KeySet,
key: &mut StringKey<'a>
) -> Result<bool, KDBError<'a>>
[src]
&mut self,
keyset: &mut KeySet,
key: &mut StringKey<'a>
) -> Result<bool, KDBError<'a>>
Retrieve keys in an atomic and universal way.
Note that the provided keyset is modified and contains the result.
The provided key
is used to give a hint about which keys should be retrieved.
The return value is true, if the keys were successfully retrieved
and false if there were no changes to the keyset.
pub fn set<'a>(
&mut self,
keyset: &mut KeySet,
key: &mut StringKey<'a>
) -> Result<bool, KDBError<'a>>
[src]
&mut self,
keyset: &mut KeySet,
key: &mut StringKey<'a>
) -> Result<bool, KDBError<'a>>
Set keys in an atomic and universal way.
The provided key
is used to give a hint about which keys should be stored.
The return value is true on success,
and false if there were no changes to the KDB.
Notes
You have to call get
with keyset
first.
pub fn ensure<'a>(
&mut self,
keyset: &mut KeySet,
key: &mut StringKey<'a>
) -> Result<bool, KDBError<'a>>
[src]
&mut self,
keyset: &mut KeySet,
key: &mut StringKey<'a>
) -> Result<bool, KDBError<'a>>
This method can be used the given KDB handle meets certain clauses, specified in contract. The return value is true on success, and false if clauses of the contract are unmet.
pub fn as_ptr(&mut self) -> *mut KDB
[src]
Returns the raw pointer of the KDB object.
Should be used with caution. In particular,
the pointer should only be modified with
elektra_sys::kdb*
functions, but kdbClose
should not be called.
Trait Implementations
Auto Trait Implementations
impl !Sync for KDB
impl !Send for KDB
impl Unpin for KDB
impl UnwindSafe for KDB
impl RefUnwindSafe for KDB
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,