pub struct MemoryWorkspaceContextStore { /* private fields */ }Expand description
Process-local context adapter for tests and embedded callers.
Implementations§
Trait Implementations§
Source§impl WorkspaceContextStore for MemoryWorkspaceContextStore
impl WorkspaceContextStore for MemoryWorkspaceContextStore
Source§type Error = MemoryWorkspaceContextStoreError
type Error = MemoryWorkspaceContextStoreError
Adapter error.
Source§async fn load(
&self,
context_id: WorkspaceContextId,
) -> Result<Option<WorkspaceContext>, Self::Error>
async fn load( &self, context_id: WorkspaceContextId, ) -> Result<Option<WorkspaceContext>, Self::Error>
Loads one context, if registered.
Source§async fn list(&self) -> Result<Vec<WorkspaceContext>, Self::Error>
async fn list(&self) -> Result<Vec<WorkspaceContext>, Self::Error>
Lists all durable contexts. Records are small and this is used only for
routing, recursive discard, and recovery—not filesystem indexing.
Source§async fn compare_and_swap(
&self,
context_id: WorkspaceContextId,
expected_revision: u64,
replacement: WorkspaceContext,
) -> Result<bool, Self::Error>
async fn compare_and_swap( &self, context_id: WorkspaceContextId, expected_revision: u64, replacement: WorkspaceContext, ) -> Result<bool, Self::Error>
Atomically replaces
expected_revision; zero creates a context.Source§async fn compare_and_swap_many(
&self,
expected_revisions: BTreeMap<WorkspaceContextId, u64>,
replacements: Vec<WorkspaceContext>,
require_exact_set: bool,
) -> Result<bool, Self::Error>
async fn compare_and_swap_many( &self, expected_revisions: BTreeMap<WorkspaceContextId, u64>, replacements: Vec<WorkspaceContext>, require_exact_set: bool, ) -> Result<bool, Self::Error>
Atomically verifies every listed revision and replaces the supplied
records. Expected revision zero means that context must be absent.
Source§async fn discard_subtree(
&self,
parent: WorkspaceContextId,
child: WorkspaceContextId,
maximum: u32,
) -> Result<WorkspaceContextDiscardOutcome, Self::Error>
async fn discard_subtree( &self, parent: WorkspaceContextId, child: WorkspaceContextId, maximum: u32, ) -> Result<WorkspaceContextDiscardOutcome, Self::Error>
Atomically validates and tombstones one direct-child subtree.
Auto Trait Implementations§
impl !Freeze for MemoryWorkspaceContextStore
impl RefUnwindSafe for MemoryWorkspaceContextStore
impl Send for MemoryWorkspaceContextStore
impl Sync for MemoryWorkspaceContextStore
impl Unpin for MemoryWorkspaceContextStore
impl UnsafeUnpin for MemoryWorkspaceContextStore
impl UnwindSafe for MemoryWorkspaceContextStore
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request