pub struct InMemoryJournal { /* private fields */ }Implementations§
Source§impl InMemoryJournal
impl InMemoryJournal
pub fn new() -> InMemoryJournal
Trait Implementations§
Source§impl Default for InMemoryJournal
impl Default for InMemoryJournal
Source§fn default() -> InMemoryJournal
fn default() -> InMemoryJournal
Returns the “default value” for a type. Read more
Source§impl Journal for InMemoryJournal
impl Journal for InMemoryJournal
fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 Event,
) -> Pin<Box<dyn Future<Output = Result<(), JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryJournal: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemoryJournal: 'async_trait,
Source§fn acquire_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
owner: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<Result<(), LeaseHolder>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
InMemoryJournal: 'async_trait,
fn acquire_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
owner: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<Result<(), LeaseHolder>, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
InMemoryJournal: 'async_trait,
Take (or re-take) the lease on
run_id for ttl. Returns the current
holder if another live owner has it.Source§fn renew_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
owner: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<bool, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
InMemoryJournal: 'async_trait,
fn renew_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
owner: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<bool, JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
InMemoryJournal: 'async_trait,
Extend a lease this owner holds.
false means it was lost.fn release_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
owner: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), JournalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
InMemoryJournal: 'async_trait,
Auto Trait Implementations§
impl !Freeze for InMemoryJournal
impl !RefUnwindSafe for InMemoryJournal
impl !UnwindSafe for InMemoryJournal
impl Send for InMemoryJournal
impl Sync for InMemoryJournal
impl Unpin for InMemoryJournal
impl UnsafeUnpin for InMemoryJournal
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