pub enum AppCommandType {
Model {
target: Option<String>,
},
Clear,
Compact,
}Expand description
Types of app commands that can be executed
Variants§
Model
Model management - list or change models
Clear
Clear the conversation
Compact
Compact the conversation
Implementations§
Source§impl AppCommandType
impl AppCommandType
Sourcepub fn parse(input: &str) -> Result<AppCommandType, SlashCommandError>
pub fn parse(input: &str) -> Result<AppCommandType, SlashCommandError>
Parse a command string into an AppCommandType
Sourcepub fn as_command_str(&self) -> String
pub fn as_command_str(&self) -> String
Get the command string representation
Trait Implementations§
Source§impl Clone for AppCommandType
impl Clone for AppCommandType
Source§fn clone(&self) -> AppCommandType
fn clone(&self) -> AppCommandType
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 AppCommandType
impl Debug for AppCommandType
Source§impl<'de> Deserialize<'de> for AppCommandType
impl<'de> Deserialize<'de> for AppCommandType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AppCommandType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AppCommandType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for AppCommandType
impl Display for AppCommandType
Source§impl FromStr for AppCommandType
impl FromStr for AppCommandType
Source§type Err = SlashCommandError
type Err = SlashCommandError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<AppCommandType, <AppCommandType as FromStr>::Err>
fn from_str(s: &str) -> Result<AppCommandType, <AppCommandType as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl PartialEq for AppCommandType
impl PartialEq for AppCommandType
Source§fn eq(&self, other: &AppCommandType) -> bool
fn eq(&self, other: &AppCommandType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AppCommandType
impl Serialize for AppCommandType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for AppCommandType
Auto Trait Implementations§
impl Freeze for AppCommandType
impl RefUnwindSafe for AppCommandType
impl Send for AppCommandType
impl Sync for AppCommandType
impl Unpin for AppCommandType
impl UnsafeUnpin for AppCommandType
impl UnwindSafe for AppCommandType
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>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.