pub struct MemoryStore { /* private fields */ }Expand description
In-process store for tests and short-lived agents.
Implementations§
Trait Implementations§
Source§impl Default for MemoryStore
impl Default for MemoryStore
Source§fn default() -> MemoryStore
fn default() -> MemoryStore
Returns the “default value” for a type. Read more
Source§impl RunStore for MemoryStore
impl RunStore for MemoryStore
fn append_event<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: RunId,
event: &'life1 Event,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryStore: 'async_trait,
fn save_state<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 RunState,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryStore: 'async_trait,
fn load_state<'life0, 'async_trait>(
&'life0 self,
run_id: RunId,
) -> Pin<Box<dyn Future<Output = Result<Option<RunState>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryStore: 'async_trait,
Auto Trait Implementations§
impl !Freeze for MemoryStore
impl Forget for MemoryStore
impl Move for MemoryStore
impl RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStorewhere
Align4<u32>: Unpin,
Align1<u8>: Unpin,
*const u8 is !null: Unpin,
*const LeafNode<String, Value> is !null: Unpin,
Box<(String, Value)>: Unpin,
Box<ApprovalCard>: Unpin,
Box<RunState>: Unpin,
Arc<Mutex<Vec<EffectKey>>>: Unpin,
*const LeafNode<String, SetValZST> is !null: Unpin,
Box<(String, SetValZST)>: Unpin,
impl UnsafeUnpin for MemoryStorewhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(RunId, Vec<Event>)>: UnsafeUnpin,
PhantomData<(RunId, RunState)>: UnsafeUnpin,
impl UnwindSafe for MemoryStore
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