pub enum CommandOutcome {
NoOp,
Reply {
text: String,
},
Send {
text: String,
attachments: Vec<Attachment>,
},
Cancelled {
extension_name: String,
reason: Option<String>,
},
Unknown,
}Expand description
Result of dispatching a command event to its owner extension.
Variants§
NoOp
Owner returned continue or any wrong-event action; treat as
no-op. The slash-command invocation produced nothing.
Reply
Owner returned reply — TUI emits a Notice with text.
Send
Owner returned send — TUI synthesizes a
Command::SendUserMessage with text + attachments.
Cancelled
Owner returned cancel — TUI emits a Notice with the reason.
(Cancel from a command event is unusual but spec-permitted —
degrades to a user-visible message.)
Unknown
No extension owns this command name.
Trait Implementations§
Source§impl Clone for CommandOutcome
impl Clone for CommandOutcome
Source§fn clone(&self) -> CommandOutcome
fn clone(&self) -> CommandOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandOutcome
impl Debug for CommandOutcome
Source§impl PartialEq for CommandOutcome
impl PartialEq for CommandOutcome
Source§fn eq(&self, other: &CommandOutcome) -> bool
fn eq(&self, other: &CommandOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CommandOutcome
impl StructuralPartialEq for CommandOutcome
Auto Trait Implementations§
impl Freeze for CommandOutcome
impl RefUnwindSafe for CommandOutcome
impl Send for CommandOutcome
impl Sync for CommandOutcome
impl Unpin for CommandOutcome
impl UnsafeUnpin for CommandOutcome
impl UnwindSafe for CommandOutcome
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.