pub enum DbCollection {
SQLite(SqliteCollection),
}Variants§
SQLite(SqliteCollection)
Trait Implementations§
Source§impl Collection for DbCollection
impl Collection for DbCollection
Source§fn get(&self, key: &str) -> Result<Vec<u8>, StoreError>
fn get(&self, key: &str) -> Result<Vec<u8>, StoreError>
Returns the value stored under
key. Read moreSource§fn put(&mut self, key: &str, data: &[u8]) -> Result<(), StoreError>
fn put(&mut self, key: &str, data: &[u8]) -> Result<(), StoreError>
Associates
data with key, inserting or replacing any previous value.Source§fn iter<'a>(
&'a self,
reverse: bool,
) -> Result<Box<dyn Iterator<Item = Result<(String, Vec<u8>), StoreError>> + 'a>, StoreError>
fn iter<'a>( &'a self, reverse: bool, ) -> Result<Box<dyn Iterator<Item = Result<(String, Vec<u8>), StoreError>> + 'a>, StoreError>
Returns an iterator over all key-value pairs. Read more
Source§impl DbManager<DbCollection, DbCollection> for Database
impl DbManager<DbCollection, DbCollection> for Database
Source§fn create_collection(
&self,
name: &str,
prefix: &str,
) -> Result<DbCollection, StoreError>
fn create_collection( &self, name: &str, prefix: &str, ) -> Result<DbCollection, StoreError>
Creates a new ordered key-value collection, typically used to store events. Read more
Source§fn create_state(
&self,
name: &str,
prefix: &str,
) -> Result<DbCollection, StoreError>
fn create_state( &self, name: &str, prefix: &str, ) -> Result<DbCollection, StoreError>
Creates a single-value state store, typically used to store actor snapshots. Read more
Auto Trait Implementations§
impl Freeze for DbCollection
impl RefUnwindSafe for DbCollection
impl Send for DbCollection
impl Sync for DbCollection
impl Unpin for DbCollection
impl UnsafeUnpin for DbCollection
impl UnwindSafe for DbCollection
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