Struct snarkos_storage::LedgerStorage [−][src]
pub struct LedgerStorage { /* fields omitted */ }
Implementations
impl RocksDb
[src]
impl RocksDb
[src]pub fn open_cf<P: AsRef<Path>>(
path: P,
num_cfs: u32
) -> Result<Self, StorageError>
[src]
path: P,
num_cfs: u32
) -> Result<Self, StorageError>
Opens storage from the given path with its given names. If storage does not exists, it creates a new storage file at the given path with its given names, and opens it. If RocksDB fails to open, returns StorageError.
pub fn open_secondary_cf<P: AsRef<Path> + Clone>(
primary_path: P,
secondary_path: P,
num_cfs: u32
) -> Result<Self, StorageError>
[src]
primary_path: P,
secondary_path: P,
num_cfs: u32
) -> Result<Self, StorageError>
Opens a secondary storage instance from the given path with its given names. If RocksDB fails to open, returns StorageError.
Trait Implementations
impl Storage for RocksDb
[src]
impl Storage for RocksDb
[src]const IN_MEMORY: bool
[src]
fn open(
path: Option<&Path>,
secondary_path: Option<&Path>
) -> Result<Self, StorageError>
[src]
path: Option<&Path>,
secondary_path: Option<&Path>
) -> Result<Self, StorageError>
fn get(&self, col: u32, key: &[u8]) -> Result<Option<Vec<u8>>, StorageError>
[src]
fn get_col(&self, col: u32) -> Result<Vec<(Box<[u8]>, Box<[u8]>)>, StorageError>
[src]
fn get_keys(&self, col: u32) -> Result<Vec<Box<[u8]>>, StorageError>
[src]
fn put<K: AsRef<[u8]>, V: AsRef<[u8]>>(
&self,
col: u32,
key: K,
value: V
) -> Result<(), StorageError>
[src]
&self,
col: u32,
key: K,
value: V
) -> Result<(), StorageError>
fn batch(&self, transaction: DatabaseTransaction) -> Result<(), StorageError>
[src]
fn exists(&self, col: u32, key: &[u8]) -> bool
[src]
fn try_catch_up_with_primary(&self) -> Result<(), StorageError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for RocksDb
impl RefUnwindSafe for RocksDb
impl UnwindSafe for RocksDb
impl UnwindSafe for RocksDb