pub struct MemoryStore { /* private fields */ }Implementations§
Source§impl MemoryStore
impl MemoryStore
Trait Implementations§
Source§impl Clone for MemoryStore
impl Clone for MemoryStore
Source§impl Debug for MemoryStore
impl Debug for MemoryStore
Source§impl Default for MemoryStore
impl Default for MemoryStore
Source§impl RecordingStore for MemoryStore
impl RecordingStore for MemoryStore
fn finalize(&mut self, node: Node) -> Result<()>
Source§fn revision(&self) -> Option<u64>
fn revision(&self) -> Option<u64>
Revision covering every store mutation, or None for externally writable stores.
Source§fn trusted_immutable_identity(&self) -> bool
fn trusted_immutable_identity(&self) -> bool
Existing settled identity/result bytes cannot change through this backend.
Source§fn stage_pending(&mut self, node: Node) -> Result<()>
fn stage_pending(&mut self, node: Node) -> Result<()>
Stage a live call before dispatch. Append-only backends may keep this
transient and publish a single completed record during finalization.
Source§fn cache_revision(&self) -> Option<StoreRevision>
fn cache_revision(&self) -> Option<StoreRevision>
A token valid only on this store instance. Returning Some promises that
every committed mutation changes a component and that reads observe the
current token. Local writes preserve settled identity/result bytes; other
changes, including external SQL and triggers, must change
external.
A single-node write must not modify other cached nodes; such side effects
require changing external or returning None instead.
Runtimes recheck tokens after scans and discard caches on any change.Source§fn ancestry_snapshot(&self, _id: &str) -> Result<Option<Vec<Node>>>
fn ancestry_snapshot(&self, _id: &str) -> Result<Option<Vec<Node>>>
Return a detached, consistent read of the requested node followed by all
ancestors, ending at a root. All payload blobs must share that snapshot.
None means the backend cannot provide a snapshot; runtime verification
then retains its fail-closed behavior under sustained concurrent changes.
Source§fn subtree_snapshot(&self, _root: &str) -> Result<Option<Vec<Node>>>
fn subtree_snapshot(&self, _root: &str) -> Result<Option<Vec<Node>>>
Return a detached, consistent read of the complete subtree rooted here,
with the requested root first and each parent preceding its children.
The root’s external ancestry must also be verified in the same snapshot.
Snapshot reads must not leave a transaction open after success or failure.
fn supports_reservations(&self) -> bool
Source§fn reserve_budget(
&mut self,
_id: &str,
_budgets: &[BudgetReservation],
_windows: &[WindowReservation],
_lease_seconds: f64,
) -> Result<Option<ReservationCheck>>
fn reserve_budget( &mut self, _id: &str, _budgets: &[BudgetReservation], _windows: &[WindowReservation], _lease_seconds: f64, ) -> Result<Option<ReservationCheck>>
None means this backend has no shared-budget arbiter.
fn settle_budget( &mut self, _id: &str, _charges: &BTreeMap<String, Decimal>, ) -> Result<()>
fn release_budget(&mut self, _id: &str) -> Result<()>
Source§fn lease_renewer(&self) -> Option<LeaseRenewer>
fn lease_renewer(&self) -> Option<LeaseRenewer>
An independent connection-safe heartbeat, callable while a handler executes.
Source§impl Store for MemoryStore
impl Store for MemoryStore
fn put(&mut self, node: Node) -> Result<()>
fn get(&self, id: &str) -> Result<Node>
fn exists(&self, id: &str) -> bool
fn children(&self, id: &str) -> Result<Vec<String>>
fn update_meta(&mut self, id: &str, patch: Value) -> Result<()>
fn roots(&self) -> Result<Vec<String>>
Source§fn apply_batch(
&mut self,
nodes: Vec<Node>,
patches: Vec<(String, Value)>,
) -> Result<()>
fn apply_batch( &mut self, nodes: Vec<Node>, patches: Vec<(String, Value)>, ) -> Result<()>
Apply a prevalidated batch. Backends may override to provide atomicity.
fn drop_nodes(&mut self, ids: &BTreeSet<String>) -> Result<()>
fn compact(&mut self) -> Result<usize>
Source§fn operation_log(&self) -> Result<Vec<u8>>
fn operation_log(&self) -> Result<Vec<u8>>
Snapshot compatible append-only log bytes, when the backend exposes one.
Source§fn try_exists(&self, id: &str) -> Result<bool>
fn try_exists(&self, id: &str) -> Result<bool>
Fallible existence query. Runtime dispatch must use this method so a
remote connection failure cannot be mistaken for a missing recording.
Source§fn import_nodes(&mut self, nodes: Vec<Node>) -> Result<(usize, usize)>
fn import_nodes(&mut self, nodes: Vec<Node>) -> Result<(usize, usize)>
Import collision checks and writes share one transaction on native stores.
Source§fn merge_nodes(&mut self, nodes: Vec<Node>, replay: bool) -> Result<MergeReport>
fn merge_nodes(&mut self, nodes: Vec<Node>, replay: bool) -> Result<MergeReport>
Merge destination reads and writes share one transaction on SQLite.
fn walk(&self, root: &str) -> Result<Vec<Node>>
Auto Trait Implementations§
impl Freeze for MemoryStore
impl RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl UnsafeUnpin for MemoryStore
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