Trait lmdb_zero::error::LmdbResultExt [] [src]

pub trait LmdbResultExt {
    type Inner;
    fn to_opt(self) -> Result<Option<Self::Inner>>;
    fn ignore_exists(self, inner: Self::Inner) -> Self;
}

Extension methods for LMDB results

Associated Types

Required Methods

Lift "not found" errors to None.

If Ok(val), return Ok(Some(val)). If Err but the code is NOTFOUND, return Ok(None). Otherwise, return self.

Suppress KEYEXIST errors.

If this is Err and the code is KEYEXIST, switch to Ok with the given inner value.

Implementors