pub struct HaematiteStore { /* private fields */ }Expand description
DurableStore implementation that delegates directly to haematite’s EventStore.
The real EventStore is synchronous (every call blocks on the owning
shard actor’s reply), so each async method below completes on its first
poll. The synchronous bridge in super::bridge relies on exactly that.
Implementations§
Source§impl HaematiteStore
impl HaematiteStore
Sourcepub const fn new(event_store: Arc<EventStore>) -> Self
pub const fn new(event_store: Arc<EventStore>) -> Self
Wraps a haematite EventStore handle.
Trait Implementations§
Source§impl Clone for HaematiteStore
impl Clone for HaematiteStore
Source§fn clone(&self) -> HaematiteStore
fn clone(&self) -> HaematiteStore
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 Debug for HaematiteStore
impl Debug for HaematiteStore
Source§impl DurableStore for HaematiteStore
impl DurableStore for HaematiteStore
Source§fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
stream_key: &'life1 str,
payload: Vec<u8>,
expected_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, DurabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
stream_key: &'life1 str,
payload: Vec<u8>,
expected_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, DurabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Appends
payload to stream_key if expected_seq matches the stream head.Source§fn read_from<'life0, 'life1, 'async_trait>(
&'life0 self,
stream_key: &'life1 str,
offset: u64,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredEntry>, DurabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_from<'life0, 'life1, 'async_trait>(
&'life0 self,
stream_key: &'life1 str,
offset: u64,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredEntry>, DurabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reads entries from
stream_key beginning at offset, up to limit entries.Source§fn cas<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
old_value: u64,
new_value: u64,
) -> Pin<Box<dyn Future<Output = Result<(), DurabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cas<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
old_value: u64,
new_value: u64,
) -> Pin<Box<dyn Future<Output = Result<(), DurabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically replaces a stored numeric value if it equals
old_value. Read moreSource§fn read_value<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, DurabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_value<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, DurabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reads a numeric value previously updated through compare-and-swap.
Auto Trait Implementations§
impl !RefUnwindSafe for HaematiteStore
impl !UnwindSafe for HaematiteStore
impl Freeze for HaematiteStore
impl Send for HaematiteStore
impl Sync for HaematiteStore
impl Unpin for HaematiteStore
impl UnsafeUnpin for HaematiteStore
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