pub struct ScriptedApprovalDispatcher { /* private fields */ }Expand description
In-memory scripted approval dispatcher 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 ScriptedApprovalDispatcher
impl ScriptedApprovalDispatcher
Sourcepub fn new(response: ApprovalDispatchResponse) -> Self
pub fn new(response: ApprovalDispatchResponse) -> Self
Creates a new testing::approval value with explicit caller-provided inputs. This constructor is data-only and performs no I/O or external side effects.
§Panics
Panics if constructor invariants fail, such as invalid identifier
text or constructor-specific bounds. Use a fallible constructor such as
try_new when one is available for untrusted input.
Sourcepub fn requests(&self) -> Vec<ApprovalDispatchRequest> ⓘ
pub fn requests(&self) -> Vec<ApprovalDispatchRequest> ⓘ
Returns the requests currently held by this value. This configures deterministic in-memory test state only.
Trait Implementations§
Source§impl ApprovalDispatcher for ScriptedApprovalDispatcher
impl ApprovalDispatcher for ScriptedApprovalDispatcher
Source§fn dispatch(
&self,
request: ApprovalDispatchRequest,
) -> Result<ApprovalDispatchResponse, AgentError>
fn dispatch( &self, request: ApprovalDispatchRequest, ) -> Result<ApprovalDispatchResponse, AgentError>
Dispatches an approval request to the configured approver.
Implementations may contact host UI or policy services; the runtime
owns denial fallback and journal records around the dispatch.
Source§impl Clone for ScriptedApprovalDispatcher
impl Clone for ScriptedApprovalDispatcher
Source§fn clone(&self) -> ScriptedApprovalDispatcher
fn clone(&self) -> ScriptedApprovalDispatcher
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 moreAuto Trait Implementations§
impl Freeze for ScriptedApprovalDispatcher
impl RefUnwindSafe for ScriptedApprovalDispatcher
impl Send for ScriptedApprovalDispatcher
impl Sync for ScriptedApprovalDispatcher
impl Unpin for ScriptedApprovalDispatcher
impl UnsafeUnpin for ScriptedApprovalDispatcher
impl UnwindSafe for ScriptedApprovalDispatcher
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