pub struct InMemoryToolkitContentStore { /* private fields */ }Expand description
In-memory toolkit content store fixture for SDK conformance tests. Use it to script deterministic behavior in memory; any transcript or endpoint mutation is documented on the method that performs it.
Implementations§
Source§impl InMemoryToolkitContentStore
impl InMemoryToolkitContentStore
Sourcepub fn put<T: Serialize>(
&self,
content_ref: ContentRef,
value: &T,
) -> Result<(), AgentError>
pub fn put<T: Serialize>( &self, content_ref: ContentRef, value: &T, ) -> Result<(), AgentError>
Adds data to this in-memory testing::stores collection. It does not perform external I/O, execute tools, or append journals.
Sourcepub fn get<T: DeserializeOwned>(
&self,
content_ref: &ContentRef,
) -> Result<T, AgentError>
pub fn get<T: DeserializeOwned>( &self, content_ref: &ContentRef, ) -> Result<T, AgentError>
Looks up an entry in this local store without registry or runtime work. This reads deterministic in-memory test store state and performs no external I/O.
Trait Implementations§
Source§impl Clone for InMemoryToolkitContentStore
impl Clone for InMemoryToolkitContentStore
Source§fn clone(&self) -> InMemoryToolkitContentStore
fn clone(&self) -> InMemoryToolkitContentStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InMemoryToolkitContentStore
impl Debug for InMemoryToolkitContentStore
Source§impl Default for InMemoryToolkitContentStore
impl Default for InMemoryToolkitContentStore
Source§fn default() -> InMemoryToolkitContentStore
fn default() -> InMemoryToolkitContentStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InMemoryToolkitContentStore
impl RefUnwindSafe for InMemoryToolkitContentStore
impl Send for InMemoryToolkitContentStore
impl Sync for InMemoryToolkitContentStore
impl Unpin for InMemoryToolkitContentStore
impl UnsafeUnpin for InMemoryToolkitContentStore
impl UnwindSafe for InMemoryToolkitContentStore
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