pub struct InMemoryMemoryStore { /* private fields */ }Expand description
A process-local MemoryStore. Contents vanish on restart.
Implementations§
Source§impl InMemoryMemoryStore
impl InMemoryMemoryStore
Sourcepub fn new(template: Vec<MemoryBlock>) -> Self
pub fn new(template: Vec<MemoryBlock>) -> Self
A store whose new scopes start with copies of template.
Share the store.
Trait Implementations§
Source§impl Debug for InMemoryMemoryStore
impl Debug for InMemoryMemoryStore
Source§impl Default for InMemoryMemoryStore
impl Default for InMemoryMemoryStore
Source§impl MemoryStore for InMemoryMemoryStore
impl MemoryStore for InMemoryMemoryStore
Source§fn load<'a>(
&'a self,
scope: &'a MemoryScope,
) -> BoxFuture<'a, Result<Vec<MemoryBlock>, AgentError>>
fn load<'a>( &'a self, scope: &'a MemoryScope, ) -> BoxFuture<'a, Result<Vec<MemoryBlock>, AgentError>>
Load every block for a scope. A new scope gets the store’s default
(empty) blocks.
Source§fn apply<'a>(
&'a self,
scope: &'a MemoryScope,
op: MemoryOp,
) -> BoxFuture<'a, Result<MemoryBlock, AgentError>>
fn apply<'a>( &'a self, scope: &'a MemoryScope, op: MemoryOp, ) -> BoxFuture<'a, Result<MemoryBlock, AgentError>>
Apply one edit and persist it. Implementations call
apply_op so
the rules match everywhere.Auto Trait Implementations§
impl !Freeze for InMemoryMemoryStore
impl Forget for InMemoryMemoryStore
impl RefUnwindSafe for InMemoryMemoryStore
impl Send for InMemoryMemoryStore
impl Sync for InMemoryMemoryStore
impl Unpin for InMemoryMemoryStore
impl UnsafeUnpin for InMemoryMemoryStore
impl UnwindSafe for InMemoryMemoryStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
Open a deferred
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.