pub enum InvokeArgument {
None,
Text(String),
Json(Map<String, Value>),
}Expand description
What an invocation carries for the action’s declared input.
Variants§
None
The action takes nothing.
Text(String)
The single text input a prompted action collects.
Json(Map<String, Value>)
The typed argument object checked against the action’s parameters.
Implementations§
Source§impl InvokeArgument
impl InvokeArgument
Sourcepub fn to_slot(&self) -> Option<String>
pub fn to_slot(&self) -> Option<String>
The single-slot form the local invocation path accepts: text as is,
a typed object behind ARGUMENTS_JSON_PREFIX.
Sourcepub fn from_slot(slot: Option<&str>) -> Self
pub fn from_slot(slot: Option<&str>) -> Self
What Self::to_slot carries, as the wire field it came from. A
slot no typed object is written behind is text, which is what an
action taking a prompt collects.
Trait Implementations§
Source§impl Clone for InvokeArgument
impl Clone for InvokeArgument
Source§impl Debug for InvokeArgument
impl Debug for InvokeArgument
Source§impl Default for InvokeArgument
impl Default for InvokeArgument
Source§impl<'de> Deserialize<'de> for InvokeArgument
impl<'de> Deserialize<'de> for InvokeArgument
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for InvokeArgument
Source§impl PartialEq for InvokeArgument
impl PartialEq for InvokeArgument
Source§impl Serialize for InvokeArgument
impl Serialize for InvokeArgument
impl StructuralPartialEq for InvokeArgument
Auto Trait Implementations§
impl Forget for InvokeArgument
impl Freeze for InvokeArgument
impl Move for InvokeArgument
impl RefUnwindSafe for InvokeArgument
impl Send for InvokeArgument
impl Sync for InvokeArgument
impl Unpin for InvokeArgument
impl UnsafeUnpin for InvokeArgument
impl UnwindSafe for InvokeArgument
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
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> ⓘ
Converts
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> ⓘ
Converts
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