pub struct InvokeRequest {
pub invocation: InvocationId,
pub target: RemoteActionTarget,
pub argument: InvokeArgument,
pub context: Option<ActionContext>,
pub confirmation: Option<Confirmation>,
pub revision: Option<String>,
pub on_behalf_of: Option<InvocationId>,
pub wait_ms: Option<u32>,
pub appearance: Option<Appearance>,
pub signed: Option<Box<SignedInvocation>>,
}Expand description
A request to run one published action.
Fields§
§invocation: InvocationIdChosen by the caller and reused verbatim on retry; the provider runs the action at most once per id.
target: RemoteActionTarget§argument: InvokeArgument§context: Option<ActionContext>Human provenance carried into history. It never grants authority.
confirmation: Option<Confirmation>The caller’s explicit confirmation, for an action whose contract requires one. The provider checks it against the contract; it is evidence, not authority.
revision: Option<String>The catalogue revision the caller chose the target from, for a provider whose actions are resolved live at that revision. A provider refuses a target that no longer exists at it rather than guessing.
Omitted, a directory target resolves against the directory as it is
now, and the admission is bound to the revision the provider
resolved it at: an executing provider still refuses the action once the
directory moved on before it ran. An action whose contract asks for
confirmation needs the revision it was shown at; without one the
provider refuses with CONFIRMED_ACTION_NEEDS_REVISION.
on_behalf_of: Option<InvocationId>The live invocation this request continues: an edit an effect submits while running for someone else. The provider admits it as that invocation’s original caller, with their grants, never as the app.
wait_ms: Option<u32>Hold the receipt until the invocation settles or this many
milliseconds pass (at most MAX_REMOTE_WAIT), so a quick action
answers in one round trip. How the answer travels, not what runs:
serve takes it off the request before the provider sees it, and
InvocationLog ignores it. A provider that predates it answers at
admission, as before.
appearance: Option<Appearance>The name and avatar a bot asks to show for this action. Only an API
that can check the caller is a bot allowed it admits one
(the workspace-action API a bot drives); every other API refuses the request
(crate::appearance::refuse_here) rather than dropping the field.
signed: Option<Box<SignedInvocation>>The caller’s own signature over who asks for which action on which
resource with which arguments (SignedInvocation). A host that runs
an invocation for a caller on another device requires it and acts as
its verified signer; a request that never leaves its device (an app
asking its own session) carries none.
A call an app makes while it runs someone’s invocation carries that invocation here
instead, the one its Self::on_behalf_of names (SignedInvocation::serves): the
original caller’s signature is its proof, and the device running the app signs the
request that brings it.
Implementations§
Source§impl InvokeRequest
impl InvokeRequest
Sourcepub fn made_from(&self) -> Option<MadeFrom>
pub fn made_from(&self) -> Option<MadeFrom>
The resource this call is made from, as its caller named it in its arguments
(crate::params::FROM_ARGUMENT): what the resources it makes are made from, and what
a turn it starts answers. The dispatch admits a call made from a resource only for a
caller who may read that resource.
Sourcepub fn approval(&self) -> Option<&Approval>
pub fn approval(&self) -> Option<&Approval>
The person’s approve of the asked record this call was kept as, when the dispatch admitted it again on their answer: what a provider that waits for their yes reads instead of asking.
Sourcepub fn said_session_name(&self) -> Option<String>
pub fn said_session_name(&self) -> Option<String>
What the agent’s harness calls the session this request was sent in (“Release prep”), as
the client’s agent-session group says it: display only, the name people see the agent by
(Caller::in_named_session). None when the client named no session.
Sourcepub fn same_invocation(&self, other: &Self) -> bool
pub fn same_invocation(&self, other: &Self) -> bool
Whether other asks for the same invocation: every field but the
transport-only wait_ms, so a retry that waits
differently is still a retry.
Trait Implementations§
Source§impl Clone for InvokeRequest
impl Clone for InvokeRequest
Source§impl Debug for InvokeRequest
impl Debug for InvokeRequest
Source§impl<'de> Deserialize<'de> for InvokeRequest
impl<'de> Deserialize<'de> for InvokeRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for InvokeRequest
impl PartialEq for InvokeRequest
Source§impl Serialize for InvokeRequest
impl Serialize for InvokeRequest
impl StructuralPartialEq for InvokeRequest
Auto Trait Implementations§
impl Forget for InvokeRequest
impl Freeze for InvokeRequest
impl Move for InvokeRequest
impl RefUnwindSafe for InvokeRequest
impl Send for InvokeRequest
impl Sync for InvokeRequest
impl Unpin for InvokeRequest
impl UnsafeUnpin for InvokeRequest
impl UnwindSafe for InvokeRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more