pub struct CommandArgument {
pub title: String,
pub description: String,
pub key: String,
pub arg_type: ArgumentType,
pub options: Option<Vec<ArgumentOption>>,
}
Expand description
A user provided argument to a plugin command.
Fields§
§title: String
A human readable name for this argument, for use as placeholder text or equivelant.
description: String
A short (single sentence) description of this argument’s use.
key: String
§arg_type: ArgumentType
§options: Option<Vec<ArgumentOption>>
If arg_type
is Choice
, options
must contain a list of options.
Implementations§
Source§impl CommandArgument
impl CommandArgument
pub fn new<S: AsRef<str>>( title: S, description: S, key: S, arg_type: ArgumentType, options: Option<Vec<ArgumentOption>>, ) -> Self
Trait Implementations§
Source§impl Clone for CommandArgument
impl Clone for CommandArgument
Source§fn clone(&self) -> CommandArgument
fn clone(&self) -> CommandArgument
Returns a copy 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 moreSource§impl Debug for CommandArgument
impl Debug for CommandArgument
Source§impl<'de> Deserialize<'de> for CommandArgument
impl<'de> Deserialize<'de> for CommandArgument
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
Auto Trait Implementations§
impl Freeze for CommandArgument
impl RefUnwindSafe for CommandArgument
impl Send for CommandArgument
impl Sync for CommandArgument
impl Unpin for CommandArgument
impl UnwindSafe for CommandArgument
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