[−][src]Enum tinycdb_sys::CdbPutMode
CdbPutMode
represents the different behaviours that will be used when
inserting a key into a database where the key already exists.
Variants
No duplicate checking will be performed. This is the same as just
calling CdbCreator.add()
.
If the key already exists in the database, it will be removed prior to adding the new value. This can be quite slow if the file is large, due to having to copy data around.
Insert the key into the database only if the key does not already exist. Note that since a simple query of the database only returns the first key, this is really only useful to save space in the database.
Add the key to the database unconditionally, but also check if it already existed.
TODO: what return value does put give?
If the key already exists in the database, zero it out before adding
this key/value pair. See the comments on CdbCreator.remove()
for some
caveats regarding zeroing out keys in the database.
Trait Implementations
impl Clone for CdbPutMode
[src]
fn clone(&self) -> CdbPutMode
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for CdbPutMode
[src]
impl Debug for CdbPutMode
[src]
impl Eq for CdbPutMode
[src]
impl PartialEq<CdbPutMode> for CdbPutMode
[src]
impl StructuralEq for CdbPutMode
[src]
impl StructuralPartialEq for CdbPutMode
[src]
Auto Trait Implementations
impl RefUnwindSafe for CdbPutMode
impl Send for CdbPutMode
impl Sync for CdbPutMode
impl Unpin for CdbPutMode
impl UnwindSafe for CdbPutMode
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut 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>,