Enum CommandArgumentKind
#[non_exhaustive]pub enum CommandArgumentKind {
Word,
Greedy,
}Expand description
How much of the command line a custom argument’s value takes.
The server and a client that does not know the type parse the value as this before the mod’s own parser sees it, so the type must say it up front, when it is registered.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Word
One word, as Brigadier’s word string: ASCII letters and digits, and _ - . +. The word
ends at the first other character, a space included, so a value containing : or /
needs Greedy as the usage’s last argument.
Greedy
The rest of the line, spaces included: the argument must be the usage’s last.
Trait Implementations§
§impl Clone for CommandArgumentKind
impl Clone for CommandArgumentKind
§fn clone(&self) -> CommandArgumentKind
fn clone(&self) -> CommandArgumentKind
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 moreimpl Copy for CommandArgumentKind
§impl Debug for CommandArgumentKind
impl Debug for CommandArgumentKind
§impl Default for CommandArgumentKind
impl Default for CommandArgumentKind
§fn default() -> CommandArgumentKind
fn default() -> CommandArgumentKind
Returns the “default value” for a type. Read more
impl Eq for CommandArgumentKind
§impl PartialEq for CommandArgumentKind
impl PartialEq for CommandArgumentKind
impl StructuralPartialEq for CommandArgumentKind
Auto Trait Implementations§
impl Freeze for CommandArgumentKind
impl RefUnwindSafe for CommandArgumentKind
impl Send for CommandArgumentKind
impl Sync for CommandArgumentKind
impl Unpin for CommandArgumentKind
impl UnsafeUnpin for CommandArgumentKind
impl UnwindSafe for CommandArgumentKind
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