Struct InvokeRequest
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>,
}Expand description
A request to run one published action.
Fields§
§invocation: InvocationIdChosen by the caller and reused verbatim on retry; the host 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 host 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 host 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 host 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
host 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 host 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 host sees it, and
InvocationLedger ignores it. A host that predates it answers at
admission, as before.
appearance: Option<Appearance>The name and avatar a bot asks to show for this action. Only a door
that can check the caller is a bot allowed it admits one
(the room-action door a bot host drives); every other door refuses the request
(crate::appearance::refuse_here) rather than dropping the field.
Implementations§
§impl InvokeRequest
impl InvokeRequest
pub fn same_invocation(&self, other: &InvokeRequest) -> bool
pub fn same_invocation(&self, other: &InvokeRequest) -> 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§
§impl Clone for InvokeRequest
impl Clone for InvokeRequest
§fn clone(&self) -> InvokeRequest
fn clone(&self) -> InvokeRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for InvokeRequest
impl Debug for InvokeRequest
§impl<'de> Deserialize<'de> for InvokeRequest
impl<'de> Deserialize<'de> for InvokeRequest
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InvokeRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InvokeRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for InvokeRequest
impl PartialEq for InvokeRequest
§impl Serialize for InvokeRequest
impl Serialize for InvokeRequest
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for InvokeRequest
Auto Trait Implementations§
impl Freeze 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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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