pub enum ArgumentSpec {
Show 13 variants
    PlayerName(Requirement),
    EntityTarget(Requirement),
    SiteName(Requirement),
    Float(&'static str, f32, Requirement),
    Integer(&'static str, i32, Requirement),
    Any(&'static str, Requirement),
    Command(Requirement),
    Message(Requirement),
    SubCommand,
    Enum(&'static str, Vec<String>, Requirement),
    AssetPath(&'static str, &'static str, Vec<String>, Requirement),
    Boolean(&'static str, String, Requirement),
    Flag(&'static str),
}Expand description
Representation for chat command arguments
Variants§
PlayerName(Requirement)
The argument refers to a player by alias
EntityTarget(Requirement)
The arguments refers to an entity in some way.
SiteName(Requirement)
Float(&'static str, f32, Requirement)
The argument is a float. The associated values are
- label
- suggested tab-completion
- whether it’s optional
Integer(&'static str, i32, Requirement)
The argument is an integer. The associated values are
- label
- suggested tab-completion
- whether it’s optional
Any(&'static str, Requirement)
The argument is any string that doesn’t contain spaces
Command(Requirement)
The argument is a command name (such as in /help)
Message(Requirement)
This is the final argument, consuming all characters until the end of input.
SubCommand
This command is followed by another command (such as in /sudo)
Enum(&'static str, Vec<String>, Requirement)
The argument is likely an enum. The associated values are
- label
- Predefined string completions
- whether it’s optional
AssetPath(&'static str, &'static str, Vec<String>, Requirement)
The argument is an asset path. The associated values are
- label
- Path prefix shared by all assets
- List of all asset paths as strings for completion
- whether it’s optional
Boolean(&'static str, String, Requirement)
The argument is likely a boolean. The associated values are
- label
- suggested tab-completion
- whether it’s optional
Flag(&'static str)
The argument is a flag that enables or disables a feature.
Implementations§
Source§impl ArgumentSpec
 
impl ArgumentSpec
pub fn usage_string(&self) -> String
pub fn requirement(&self) -> Requirement
Auto Trait Implementations§
impl Freeze for ArgumentSpec
impl RefUnwindSafe for ArgumentSpec
impl Send for ArgumentSpec
impl Sync for ArgumentSpec
impl Unpin for ArgumentSpec
impl UnwindSafe for ArgumentSpec
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
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more