pub struct InMemoryJsonArgumentStore { /* private fields */ }Expand description
In-memory JSON argument 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 InMemoryJsonArgumentStore
impl InMemoryJsonArgumentStore
Sourcepub fn insert<T: Serialize>(
&self,
content_ref: ContentRef,
value: &T,
) -> Result<(), AgentError>
pub fn insert<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 InMemoryJsonArgumentStore
impl Clone for InMemoryJsonArgumentStore
Source§fn clone(&self) -> InMemoryJsonArgumentStore
fn clone(&self) -> InMemoryJsonArgumentStore
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 InMemoryJsonArgumentStore
impl Debug for InMemoryJsonArgumentStore
Source§impl Default for InMemoryJsonArgumentStore
impl Default for InMemoryJsonArgumentStore
Source§fn default() -> InMemoryJsonArgumentStore
fn default() -> InMemoryJsonArgumentStore
Returns the “default value” for a type. Read more
Source§impl JsonToolArgumentStore for InMemoryJsonArgumentStore
impl JsonToolArgumentStore for InMemoryJsonArgumentStore
Source§fn load_json(&self, content_ref: &ContentRefId) -> Result<Value, AgentError>
fn load_json(&self, content_ref: &ContentRefId) -> Result<Value, AgentError>
Loads the JSON arguments behind a content ref.
Auto Trait Implementations§
impl Freeze for InMemoryJsonArgumentStore
impl RefUnwindSafe for InMemoryJsonArgumentStore
impl Send for InMemoryJsonArgumentStore
impl Sync for InMemoryJsonArgumentStore
impl Unpin for InMemoryJsonArgumentStore
impl UnsafeUnpin for InMemoryJsonArgumentStore
impl UnwindSafe for InMemoryJsonArgumentStore
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