pub struct ReadOnlyDB { /* private fields */ }
Expand description
ReadOnlyDB wrapper
Implementations§
Source§impl ReadOnlyDB
impl ReadOnlyDB
Sourcepub fn open_cf<P, I, N>(path: P, cf_names: I) -> Result<Option<Self>>
pub fn open_cf<P, I, N>(path: P, cf_names: I) -> Result<Option<Self>>
The behavior is similar to DB::Open, except that it opens DB in read-only mode. One big difference is that when opening the DB as read-only, you don’t need to specify all Column Families – you can only open a subset of Column Families.
Sourcepub fn get_pinned_default(
&self,
key: &[u8],
) -> Result<Option<DBPinnableSlice<'_>>>
pub fn get_pinned_default( &self, key: &[u8], ) -> Result<Option<DBPinnableSlice<'_>>>
Return the value associated with a key using RocksDB’s PinnableSlice from the default column so as to avoid unnecessary memory copy.
Sourcepub fn get_pinned(
&self,
col: Col,
key: &[u8],
) -> Result<Option<DBPinnableSlice<'_>>>
pub fn get_pinned( &self, col: Col, key: &[u8], ) -> Result<Option<DBPinnableSlice<'_>>>
Return the value associated with a key using RocksDB’s PinnableSlice from the given column so as to avoid unnecessary memory copy.
Auto Trait Implementations§
impl Freeze for ReadOnlyDB
impl RefUnwindSafe for ReadOnlyDB
impl Send for ReadOnlyDB
impl Sync for ReadOnlyDB
impl Unpin for ReadOnlyDB
impl UnwindSafe for ReadOnlyDB
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more