Struct MemoryProjectionHandle
pub struct MemoryProjectionHandle(/* private fields */);Expand description
One handle onto a MemoryProjectionFixture’s store.
MemoryHandle’s counterpart, and a newtype for the same coherence reason:
impl ProjectionStore for Arc<S> is very likely error[E0119] against the
blanket impl trait_variant emits, so a shared handle has to be a distinct
type that delegates.
It implements SendProjectionStore rather than merely ProjectionStore,
because MemoryProjectionStore is a native, thread-safe store and a handle
that quietly weakened that would stop exercising the flavour the reference
implementation claims. The suite still binds the weaker flavour: the blanket
impl is what carries this handle into it.
Implementations§
§impl MemoryProjectionHandle
impl MemoryProjectionHandle
pub fn new(store: Arc<MemoryProjectionStore>) -> Self
pub fn new(store: Arc<MemoryProjectionStore>) -> Self
Wraps a shared store as one handle onto it.
Public so that an adapter author writing their own fixture has the whole
reference implementation in front of them rather than most of it: the
doctest on ProjectionFixture builds one.
Trait Implementations§
§impl Clone for MemoryProjectionHandle
impl Clone for MemoryProjectionHandle
§impl Debug for MemoryProjectionHandle
impl Debug for MemoryProjectionHandle
§impl ProjectionProbe for MemoryProjectionHandle
impl ProjectionProbe for MemoryProjectionHandle
§const READS_THROUGH_BATCH: bool = true
const READS_THROUGH_BATCH: bool = true
true, delegated in spirit from the store: MemoryProjectionStore
applies on write, so a batch can be read back through before it commits.
Spelled as a literal rather than as
<MemoryProjectionStore as ProjectionProbe>::READS_THROUGH_BATCH
because an associated const cannot be delegated in a way a reader can
check at a glance, and the two are one line apart in the same workspace.