Struct ActionInvoker
pub struct ActionInvoker {
pub actor: String,
pub kind: ActorKind,
pub on_behalf_of: Option<String>,
pub participant: Option<ParticipantId>,
pub appearance: Option<Appearance>,
}Expand description
The invoker of one action: the authenticated actor, its kind, the person it acts for, and optionally the participant whose view the invocation resolves against.
participant: None means the actor’s single/default view (the local
window for a person; the only view of a single-view app).
Fields§
§actor: StringAuthenticated principal, the same string the host admitted
(PublishedInvocationRequest::actor in ui-core).
kind: ActorKind§on_behalf_of: Option<String>The person an agent, Shortcut or app acted for.
participant: Option<ParticipantId>§appearance: Option<Appearance>The name and avatar a bot showed for this action. Set only by the door that admitted the invocation, and only for a bot allowed it.
Implementations§
§impl ActionInvoker
impl ActionInvoker
pub fn actor(actor: impl Into<String>) -> ActionInvoker
pub fn actor(actor: impl Into<String>) -> ActionInvoker
A person the host authenticated, acting for themselves.
pub fn admitted(actor: &InteractionActor) -> ActionInvoker
pub fn admitted(actor: &InteractionActor) -> ActionInvoker
The actor the host admitted: its id, its kind, and the person it acts for.
pub fn with_participant(self, participant: ParticipantId) -> ActionInvoker
pub fn with_kind(self, kind: ActorKind) -> ActionInvoker
pub fn acting_for(self, person: impl Into<String>) -> ActionInvoker
pub fn acting_for(self, person: impl Into<String>) -> ActionInvoker
The person this actor acts for. A person acting for themselves records nobody.
pub fn with_appearance(self, appearance: Option<Appearance>) -> ActionInvoker
pub fn with_appearance(self, appearance: Option<Appearance>) -> ActionInvoker
The appearance the door admitted for this one invocation; None
clears one, so an invoker copied from a caller’s context never keeps
what no door checked.
pub fn delivered(actor: &str, context: Option<&ActionContext>) -> ActionInvoker
pub fn delivered(actor: &str, context: Option<&ActionContext>) -> ActionInvoker
The invoker an application worker may act on for one delivered
invocation. actor is the identity the host authenticated and put on
the delivery; context is the host-built provenance of the same
delivery. The participant and the person it acts for are kept only
when the context names this exact actor, or a Shortcut acting for
exactly that actor. A context the host did not rewrite for this actor
therefore never routes to anybody’s view.
Trait Implementations§
§impl Clone for ActionInvoker
impl Clone for ActionInvoker
§fn clone(&self) -> ActionInvoker
fn clone(&self) -> ActionInvoker
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 ActionInvoker
impl Debug for ActionInvoker
§impl Default for ActionInvoker
impl Default for ActionInvoker
§fn default() -> ActionInvoker
fn default() -> ActionInvoker
§impl<'de> Deserialize<'de> for ActionInvokerwhere
ActionInvoker: Default,
impl<'de> Deserialize<'de> for ActionInvokerwhere
ActionInvoker: Default,
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionInvoker, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionInvoker, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Hash for ActionInvoker
impl Hash for ActionInvoker
§impl PartialEq for ActionInvoker
impl PartialEq for ActionInvoker
§impl Serialize for ActionInvoker
impl Serialize for ActionInvoker
§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 Eq for ActionInvoker
impl StructuralPartialEq for ActionInvoker
Auto Trait Implementations§
impl Freeze for ActionInvoker
impl RefUnwindSafe for ActionInvoker
impl Send for ActionInvoker
impl Sync for ActionInvoker
impl Unpin for ActionInvoker
impl UnsafeUnpin for ActionInvoker
impl UnwindSafe for ActionInvoker
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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