pub struct CommandOutput {
pub text: String,
pub state_changed: bool,
pub action: Option<CommandAction>,
}Expand description
Result of a slash command execution.
Fields§
§text: StringText output to display to the user.
state_changed: boolWhether the command modified session state (e.g., /clear, /compact).
action: Option<CommandAction>Optional action for the session to perform after the command.
Implementations§
Source§impl CommandOutput
impl CommandOutput
Sourcepub fn with_action(msg: impl Into<String>, action: CommandAction) -> Self
pub fn with_action(msg: impl Into<String>, action: CommandAction) -> Self
Create an output with a post-command action.
Trait Implementations§
Source§impl Clone for CommandOutput
impl Clone for CommandOutput
Source§fn clone(&self) -> CommandOutput
fn clone(&self) -> CommandOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CommandOutput
impl RefUnwindSafe for CommandOutput
impl Send for CommandOutput
impl Sync for CommandOutput
impl Unpin for CommandOutput
impl UnsafeUnpin for CommandOutput
impl UnwindSafe for CommandOutput
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