[−][src]Struct kvdb_web::Database
Database backed by both IndexedDB and in memory implementation.
Methods
impl Database
[src]
pub fn open(
name: String,
columns: u32
) -> impl Future<Output = Result<Database, Error>>
[src]
name: String,
columns: u32
) -> impl Future<Output = Result<Database, Error>>
Opens the database with the given name, and the specified number of columns (not including the default one).
pub fn name(&self) -> &str
[src]
Get the database name.
pub fn version(&self) -> u32
[src]
Get the database version.
Trait Implementations
impl Drop for Database
[src]
impl KeyValueDB for Database
[src]
fn get(&self, col: Option<u32>, key: &[u8]) -> Result<Option<DBValue>>
[src]
fn get_by_prefix(&self, col: Option<u32>, prefix: &[u8]) -> Option<Box<[u8]>>
[src]
fn write_buffered(&self, transaction: DBTransaction)
[src]
fn flush(&self) -> Result<()>
[src]
fn iter<'a>(
&'a self,
col: Option<u32>
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>
[src]
&'a self,
col: Option<u32>
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>
fn iter_from_prefix<'a>(
&'a self,
col: Option<u32>,
prefix: &'a [u8]
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>
[src]
&'a self,
col: Option<u32>,
prefix: &'a [u8]
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>
fn restore(&self, _new_db: &str) -> Result<()>
[src]
fn transaction(&self) -> DBTransaction
[src]
fn write(&self, transaction: DBTransaction) -> Result<(), Error>
[src]
Auto Trait Implementations
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl !RefUnwindSafe for Database
impl UnwindSafe for Database
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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,