pub struct Db { /* private fields */ }Implementations
sourceimpl Db
impl Db
pub fn with_columns(path: &Path, num_columns: u8) -> Result<Db>
sourcepub fn open_or_create(options: &Options) -> Result<Db>
pub fn open_or_create(options: &Options) -> Result<Db>
Create the database using given options.
pub fn open_read_only(options: &Options) -> Result<Db>
pub fn get(&self, col: u8, key: &[u8]) -> Result<Option<Value>>
pub fn get_size(&self, col: u8, key: &[u8]) -> Result<Option<u32>>
pub fn iter(&self, col: u8) -> Result<BTreeIterator<'_>>
pub fn commit<I, K>(&self, tx: I) -> Result<()>where
I: IntoIterator<Item = (u8, K, Option<Value>)>,
K: AsRef<[u8]>,
pub fn commit_changes<I>(&self, tx: I) -> Result<()>where
I: IntoIterator<Item = (u8, Operation<Vec<u8>, Vec<u8>>)>,
pub fn num_columns(&self) -> u8
pub fn write_stats_text(
&self,
writer: &mut impl Write,
column: Option<u8>
) -> Result<()>
pub fn clear_stats(&self, column: Option<u8>) -> Result<()>
pub fn dump(&self, check_param: CheckOptions) -> Result<()>
pub fn stats(&self) -> StatSummary
sourcepub fn add_column(
options: &mut Options,
new_column_options: ColumnOptions
) -> Result<()>
pub fn add_column(
options: &mut Options,
new_column_options: ColumnOptions
) -> Result<()>
Add a new column with options specified by new_column_options.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more