pub struct JournalingKeyValueDatabase<D> { /* private fields */ }Expand description
A journaling key-value database.
Trait Implementations§
Source§impl<D: Clone> Clone for JournalingKeyValueDatabase<D>
impl<D: Clone> Clone for JournalingKeyValueDatabase<D>
Source§fn clone(&self) -> JournalingKeyValueDatabase<D>
fn clone(&self) -> JournalingKeyValueDatabase<D>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<D> KeyValueDatabase for JournalingKeyValueDatabase<D>where
D: KeyValueDatabase,
D::Error: 'static,
impl<D> KeyValueDatabase for JournalingKeyValueDatabase<D>where
D: KeyValueDatabase,
D::Error: 'static,
Source§type Config = <D as KeyValueDatabase>::Config
type Config = <D as KeyValueDatabase>::Config
The configuration needed to interact with a new backend.
Source§type Store = JournalingKeyValueStore<<D as KeyValueDatabase>::Store>
type Store = JournalingKeyValueStore<<D as KeyValueDatabase>::Store>
The result of opening a partition.
Source§async fn connect(
config: &Self::Config,
namespace: &str,
) -> Result<Self, Self::Error>
async fn connect( config: &Self::Config, namespace: &str, ) -> Result<Self, Self::Error>
Connects to an existing namespace using the given configuration.
Opens a shared partition starting at
root_key. It is understood that the
partition MAY be read and written simultaneously from other clients.Source§fn open_exclusive(&self, root_key: &[u8]) -> Result<Self::Store, Self::Error>
fn open_exclusive(&self, root_key: &[u8]) -> Result<Self::Store, Self::Error>
Opens an exclusive partition starting at
root_key. It is assumed that the
partition WILL NOT be read and written simultaneously by other clients. Read moreSource§async fn list_all(config: &Self::Config) -> Result<Vec<String>, Self::Error>
async fn list_all(config: &Self::Config) -> Result<Vec<String>, Self::Error>
Obtains the list of existing namespaces.
Source§async fn list_root_keys(&self) -> Result<Vec<Vec<u8>>, Self::Error>
async fn list_root_keys(&self) -> Result<Vec<Vec<u8>>, Self::Error>
Lists the root keys of the namespace.
It is possible that some root keys have no keys.
Source§async fn delete_all(config: &Self::Config) -> Result<(), Self::Error>
async fn delete_all(config: &Self::Config) -> Result<(), Self::Error>
Deletes all the existing namespaces.
Source§async fn exists(
config: &Self::Config,
namespace: &str,
) -> Result<bool, Self::Error>
async fn exists( config: &Self::Config, namespace: &str, ) -> Result<bool, Self::Error>
Tests if a given namespace exists.
Source§async fn create(
config: &Self::Config,
namespace: &str,
) -> Result<(), Self::Error>
async fn create( config: &Self::Config, namespace: &str, ) -> Result<(), Self::Error>
Creates a namespace. Returns an error if the namespace exists.
Source§async fn delete(
config: &Self::Config,
namespace: &str,
) -> Result<(), Self::Error>
async fn delete( config: &Self::Config, namespace: &str, ) -> Result<(), Self::Error>
Deletes the given namespace.
Source§impl TestKeyValueDatabase for JournalingKeyValueDatabase<ScyllaDbDatabaseInternal>
Available on with_testing only.
impl TestKeyValueDatabase for JournalingKeyValueDatabase<ScyllaDbDatabaseInternal>
Available on
with_testing only.Source§async fn new_test_config() -> Result<ScyllaDbStoreInternalConfig, JournalingError<ScyllaDbStoreInternalError>>
async fn new_test_config() -> Result<ScyllaDbStoreInternalConfig, JournalingError<ScyllaDbStoreInternalError>>
Obtains a test config
Source§async fn connect_test_namespace() -> Result<Self, Self::Error>
async fn connect_test_namespace() -> Result<Self, Self::Error>
Creates a database for testing purposes
Auto Trait Implementations§
impl<D> Freeze for JournalingKeyValueDatabase<D>where
D: Freeze,
impl<D> RefUnwindSafe for JournalingKeyValueDatabase<D>where
D: RefUnwindSafe,
impl<D> Send for JournalingKeyValueDatabase<D>where
D: Send,
impl<D> Sync for JournalingKeyValueDatabase<D>where
D: Sync,
impl<D> Unpin for JournalingKeyValueDatabase<D>where
D: Unpin,
impl<D> UnsafeUnpin for JournalingKeyValueDatabase<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for JournalingKeyValueDatabase<D>where
D: UnwindSafe,
Blanket Implementations§
impl<_INNER> AutoTraits for _INNER
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 moreimpl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSync for Twhere
T: Sync,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length bytes from memory from the provided location.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes to memory at the provided location.