pub struct MemoryObjectStore { /* private fields */ }Expand description
In-memory test object store for fixtures and early callers.
Implementations§
Source§impl MemoryObjectStore
impl MemoryObjectStore
Sourcepub fn read_typed(
&self,
id: ObjectId,
object_type: ObjectType,
) -> Result<Option<ObjectEnvelope>>
pub fn read_typed( &self, id: ObjectId, object_type: ObjectType, ) -> Result<Option<ObjectEnvelope>>
Read and require a specific object type.
Trait Implementations§
Source§impl Debug for MemoryObjectStore
impl Debug for MemoryObjectStore
Source§impl Default for MemoryObjectStore
impl Default for MemoryObjectStore
Source§fn default() -> MemoryObjectStore
fn default() -> MemoryObjectStore
Returns the “default value” for a type. Read more
Source§impl ObjectReader for MemoryObjectStore
impl ObjectReader for MemoryObjectStore
Source§fn read_object(&self, id: ObjectId) -> Result<Option<ObjectEnvelope>>
fn read_object(&self, id: ObjectId) -> Result<Option<ObjectEnvelope>>
Read an object by ID.
Source§fn read_typed(
&self,
id: ObjectId,
object_type: ObjectType,
) -> Result<Option<ObjectEnvelope>>
fn read_typed( &self, id: ObjectId, object_type: ObjectType, ) -> Result<Option<ObjectEnvelope>>
Read and require a specific object type. Default-implemented in terms of
read_object alone
(RFC 111 §6.1: every implementor – FileObjectStore, ObjectReadSnapshot,
ObjectWriteSession, MemoryObjectStore – gets this for free, and any function generic over
impl ObjectReader can call it without depending on a concrete type). One body, not one per
implementor (Stage 1 review v1 §3): every concrete type’s own read_typed delegates here too.Source§impl ObjectWriter for MemoryObjectStore
impl ObjectWriter for MemoryObjectStore
Source§fn write_object(&mut self, envelope: &ObjectEnvelope) -> Result<ObjectId>
fn write_object(&mut self, envelope: &ObjectEnvelope) -> Result<ObjectId>
Write an object envelope after validation.
Auto Trait Implementations§
impl Freeze for MemoryObjectStore
impl RefUnwindSafe for MemoryObjectStore
impl Send for MemoryObjectStore
impl Sync for MemoryObjectStore
impl Unpin for MemoryObjectStore
impl UnsafeUnpin for MemoryObjectStore
impl UnwindSafe for MemoryObjectStore
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