[−][src]Struct grin_store::Store
LMDB-backed store facilitating data access and serialization. All writes are done through a Batch abstraction providing atomicity.
Methods
impl Store
[src]
impl Store
pub fn open(env: Arc<Environment>, name: &str) -> Store
[src]
pub fn open(env: Arc<Environment>, name: &str) -> Store
Creates a new store with the provided name under the specified environment
pub fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Error>
[src]
pub fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Error>
Gets a value from the db, provided its key
pub fn get_ser<T: Readable>(&self, key: &[u8]) -> Result<Option<T>, Error>
[src]
pub fn get_ser<T: Readable>(&self, key: &[u8]) -> Result<Option<T>, Error>
Gets a Readable
value from the db, provided its key. Encapsulates
serialization.
pub fn exists(&self, key: &[u8]) -> Result<bool, Error>
[src]
pub fn exists(&self, key: &[u8]) -> Result<bool, Error>
Whether the provided key exists
pub fn iter<T: Readable>(&self, from: &[u8]) -> Result<SerIterator<T>, Error>
[src]
pub fn iter<T: Readable>(&self, from: &[u8]) -> Result<SerIterator<T>, Error>
Produces an iterator of Readable
types moving forward from the
provided key.
pub fn batch(&self) -> Result<Batch, Error>
[src]
pub fn batch(&self) -> Result<Batch, Error>
Builds a new batch to be used with this store.
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T> SafeBorrow for T where
T: ?Sized,
impl<T> SafeBorrow for T where
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
fn borrow_replacement(ptr: &T) -> &T
impl<T> UnsafeAny for T where
T: Any,
impl<T> UnsafeAny for T where
T: Any,
impl<T> Erased for T
impl<T> Erased for T
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self