pub enum InputSpec {
None,
Text {
prompt: String,
placeholder: String,
collects: Collects,
},
}Expand description
What an invocation of one action must carry, advertised on the descriptor rather than discovered by trying — enumeration is the only thing a caller that can’t see the screen has to work from.
Variants§
None
Takes nothing. The majority.
Text
Takes one text argument. prompt and placeholder are the app’s own
words for it — the ones the palette would show a person — and collects
says what kind of thing it names.
Implementations§
Source§impl InputSpec
impl InputSpec
Sourcepub fn wants_text(&self) -> bool
pub fn wants_text(&self) -> bool
Whether an invocation must supply text.
Sourcepub fn wants_content(&self) -> bool
pub fn wants_content(&self) -> bool
Whether the text it wants is the address of content rather than words — words can be quoted out of the request, a content hash cannot.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for InputSpec
impl<'de> Deserialize<'de> for InputSpec
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 InputSpec
Source§impl From<&InputSpec> for PublishedInput
impl From<&InputSpec> for PublishedInput
Source§impl From<&PublishedInput> for InputSpec
impl From<&PublishedInput> for InputSpec
Source§fn from(input: &PublishedInput) -> Self
fn from(input: &PublishedInput) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for InputSpec
Auto Trait Implementations§
impl Forget for InputSpec
impl Freeze for InputSpec
impl Move for InputSpec
impl RefUnwindSafe for InputSpec
impl Send for InputSpec
impl Sync for InputSpec
impl Unpin for InputSpec
impl UnsafeUnpin for InputSpec
impl UnwindSafe for InputSpec
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