[−][src]Struct cita_database::rocksdb::RocksDB
Fields
config: Config
write_opts: WriteOptions
read_opts: ReadOptions
Methods
impl RocksDB
[src]
pub fn open_default(path: &str) -> Result<Self>
[src]
Open a rocksDB with default config.
pub fn open(path: &str, config: &Config) -> Result<Self>
[src]
Open rocksDB with config.
pub fn close(&mut self)
[src]
pub fn restore(&mut self, new_db_path: &str) -> Result<()>
[src]
Restore the database from a copy at given path.
pub fn iterator(&self, category: Option<DataCategory>) -> Option<DBIterator>
[src]
Trait Implementations
impl Database for RocksDB
[src]
fn get(
&self,
category: Option<DataCategory>,
key: &[u8]
) -> Result<Option<Vec<u8>>>
[src]
&self,
category: Option<DataCategory>,
key: &[u8]
) -> Result<Option<Vec<u8>>>
fn get_batch(
&self,
category: Option<DataCategory>,
keys: &[Vec<u8>]
) -> Result<Vec<Option<Vec<u8>>>>
[src]
&self,
category: Option<DataCategory>,
keys: &[Vec<u8>]
) -> Result<Vec<Option<Vec<u8>>>>
fn insert(
&self,
category: Option<DataCategory>,
key: Vec<u8>,
value: Vec<u8>
) -> Result<()>
[src]
&self,
category: Option<DataCategory>,
key: Vec<u8>,
value: Vec<u8>
) -> Result<()>
fn insert_batch(
&self,
category: Option<DataCategory>,
keys: Vec<Vec<u8>>,
values: Vec<Vec<u8>>
) -> Result<()>
[src]
&self,
category: Option<DataCategory>,
keys: Vec<Vec<u8>>,
values: Vec<Vec<u8>>
) -> Result<()>
fn contains(&self, category: Option<DataCategory>, key: &[u8]) -> Result<bool>
[src]
fn remove(&self, category: Option<DataCategory>, key: &[u8]) -> Result<()>
[src]
fn remove_batch(
&self,
category: Option<DataCategory>,
keys: &[Vec<u8>]
) -> Result<()>
[src]
&self,
category: Option<DataCategory>,
keys: &[Vec<u8>]
) -> Result<()>
fn restore(&mut self, new_db: &str) -> Result<()>
[src]
fn iterator(&self, category: Option<DataCategory>) -> Option<DBIterator>
[src]
fn close(&mut self)
[src]
impl Sync for RocksDB
[src]
impl Send for RocksDB
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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>,
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,
impl<T> UnsafeAny for T where
T: Any,
T: Any,