pub struct EffectRequest { /* private fields */ }Expand description
The runtime description of one effect occurrence awaiting admission.
TypedEffect is the compile-time declaration surface; this value is its
object-safe dispatch counterpart. A crate::tool::Tool produces one for
each call after middleware has finalized the call. Its input hash is
computed with the same canonical JSON convention as journal payloads, so
approval tokens derived before execution match the id the dispatcher
re-derives at the boundary.
Implementations§
Source§impl EffectRequest
impl EffectRequest
Sourcepub fn new(
kind: impl Into<String>,
effect: Effect,
input: &Value,
idempotency_key: Option<String>,
) -> Self
pub fn new( kind: impl Into<String>, effect: Effect, input: &Value, idempotency_key: Option<String>, ) -> Self
Describe an effect over canonical JSON input.
Sourcepub fn from_typed<E: TypedEffect>(effect: &E) -> Self
pub fn from_typed<E: TypedEffect>(effect: &E) -> Self
Bridge a typed declaration into the runtime admission surface.
Sourcepub fn input_hash(&self) -> &str
pub fn input_hash(&self) -> &str
Canonical input digest used in the deterministic effect id.
Sourcepub fn idempotency_key(&self) -> Option<&str>
pub fn idempotency_key(&self) -> Option<&str>
Stable idempotency key, when the declaration requires one.
Trait Implementations§
Source§impl Clone for EffectRequest
impl Clone for EffectRequest
Source§fn clone(&self) -> EffectRequest
fn clone(&self) -> EffectRequest
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 EffectRequest
impl Debug for EffectRequest
impl Eq for EffectRequest
Source§impl PartialEq for EffectRequest
impl PartialEq for EffectRequest
impl StructuralPartialEq for EffectRequest
Auto Trait Implementations§
impl Freeze for EffectRequest
impl RefUnwindSafe for EffectRequest
impl Send for EffectRequest
impl Sync for EffectRequest
impl Unpin for EffectRequest
impl UnsafeUnpin for EffectRequest
impl UnwindSafe for EffectRequest
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