#[non_exhaustive]pub enum InteractionSpecError {
DuplicateOptionId {
option_id: OptionId,
},
NotEnoughOptions {
interaction_kind: InteractionKind,
required: usize,
found: usize,
},
MissingAuthorizingOption {
interaction_kind: InteractionKind,
},
MissingDeclineOption {
interaction_kind: InteractionKind,
},
MissingReviewEntries,
MissingFreeformPrompt,
MissingFreeformOption,
UnsupportedKind {
interaction_kind: InteractionKind,
},
TextResolutionNotAllowed {
interaction_kind: InteractionKind,
confirms_risk: RiskClass,
},
}Expand description
A card as specified could not be answered, or claims an authority it may not have (spec §15.2, §15.7, I6).
Refusing at creation is deliberate: a persisted card with no usable option blocks its case forever, and a high-risk card that accepts typed text turns an inference into a confirmation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DuplicateOptionId
Two options share an identifier, so the answer would be ambiguous.
NotEnoughOptions
The card carries fewer options than its kind needs.
Fields
interaction_kind: InteractionKindThe kind.
MissingAuthorizingOption
No option of a confirming card actually authorizes commands.
Fields
interaction_kind: InteractionKindThe kind.
MissingDeclineOption
No option lets the user decline, so refusing is impossible.
Fields
interaction_kind: InteractionKindThe kind.
MissingReviewEntries
A review card shows no diff.
MissingFreeformPrompt
A free-form card has no prompt.
MissingFreeformOption
A free-form card has no option that accepts the required text.
UnsupportedKind
The kind cannot be answered through the input protocol.
Fields
interaction_kind: InteractionKindThe kind.
TextResolutionNotAllowed
Typed text may not resolve this card.
Trait Implementations§
Source§impl Clone for InteractionSpecError
impl Clone for InteractionSpecError
Source§impl Debug for InteractionSpecError
impl Debug for InteractionSpecError
Source§impl<'de> Deserialize<'de> for InteractionSpecError
impl<'de> Deserialize<'de> for InteractionSpecError
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 Display for InteractionSpecError
impl Display for InteractionSpecError
impl Eq for InteractionSpecError
Source§impl Error for InteractionSpecError
impl Error for InteractionSpecError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<InteractionSpecError> for InteractionError
impl From<InteractionSpecError> for InteractionError
Source§fn from(value: InteractionSpecError) -> Self
fn from(value: InteractionSpecError) -> Self
Source§impl From<InteractionSpecError> for ErasedCallError
impl From<InteractionSpecError> for ErasedCallError
Source§fn from(value: InteractionSpecError) -> Self
fn from(value: InteractionSpecError) -> Self
Source§impl PartialEq for InteractionSpecError
impl PartialEq for InteractionSpecError
Source§impl Serialize for InteractionSpecError
impl Serialize for InteractionSpecError
impl StructuralPartialEq for InteractionSpecError
Auto Trait Implementations§
impl Freeze for InteractionSpecError
impl RefUnwindSafe for InteractionSpecError
impl Send for InteractionSpecError
impl Sync for InteractionSpecError
impl Unpin for InteractionSpecError
impl UnsafeUnpin for InteractionSpecError
impl UnwindSafe for InteractionSpecError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.