pub enum WosVariant {
Plain(Arc<WosBackend>),
Encrypted(Arc<EncryptedWosBackend>),
InMemory(Arc<InMemoryWosBackend>),
}Expand description
WOS variant — supports both plain and encrypted implementations.
Note: StorageBackend::scan has a generic parameter R: RangeBounds
which prevents dyn compatibility.
Variants§
Implementations§
Source§impl WosVariant
impl WosVariant
pub fn insert(&self, table: &str, key: &[u8], value: &[u8]) -> DbxResult<()>
pub fn insert_batch( &self, table: &str, rows: Vec<(Vec<u8>, Vec<u8>)>, ) -> DbxResult<()>
pub fn get(&self, table: &str, key: &[u8]) -> DbxResult<Option<Vec<u8>>>
pub fn delete(&self, table: &str, key: &[u8]) -> DbxResult<bool>
pub fn scan<R: RangeBounds<Vec<u8>> + Clone>( &self, table: &str, range: R, ) -> DbxResult<Vec<(Vec<u8>, Vec<u8>)>>
pub fn scan_one<R: RangeBounds<Vec<u8>> + Clone>( &self, table: &str, range: R, ) -> DbxResult<Option<(Vec<u8>, Vec<u8>)>>
pub fn flush(&self) -> DbxResult<()>
pub fn count(&self, table: &str) -> DbxResult<usize>
pub fn table_names(&self) -> DbxResult<Vec<String>>
Sourcepub fn save_schema_metadata(
&self,
table: &str,
schema: &Schema,
) -> DbxResult<()>
pub fn save_schema_metadata( &self, table: &str, schema: &Schema, ) -> DbxResult<()>
Save schema metadata (only for Plain WOS, no-op for encrypted/in-memory)
Sourcepub fn delete_schema_metadata(&self, table: &str) -> DbxResult<()>
pub fn delete_schema_metadata(&self, table: &str) -> DbxResult<()>
Delete schema metadata (only for Plain WOS)
Sourcepub fn save_index_metadata(
&self,
index_name: &str,
table: &str,
column: &str,
) -> DbxResult<()>
pub fn save_index_metadata( &self, index_name: &str, table: &str, column: &str, ) -> DbxResult<()>
Save index metadata (only for Plain WOS)
Sourcepub fn delete_index_metadata(&self, index_name: &str) -> DbxResult<()>
pub fn delete_index_metadata(&self, index_name: &str) -> DbxResult<()>
Delete index metadata (only for Plain WOS)
Auto Trait Implementations§
impl Freeze for WosVariant
impl !RefUnwindSafe for WosVariant
impl Send for WosVariant
impl Sync for WosVariant
impl Unpin for WosVariant
impl UnsafeUnpin for WosVariant
impl !UnwindSafe for WosVariant
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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