Trait valence_command::parsers::CommandArg

source ·
pub trait CommandArg: Sized {
    // Required methods
    fn parse_arg(
        input: &mut ParseInput<'_>,
    ) -> Result<Self, CommandArgParseError>;
    fn display() -> Parser;

    // Provided method
    fn arg_from_str(string: &str) -> Result<Self, CommandArgParseError> { ... }
}

Required Methods§

source

fn parse_arg(input: &mut ParseInput<'_>) -> Result<Self, CommandArgParseError>

source

fn display() -> Parser

what will the client be sent

Provided Methods§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl CommandArg for bool

source§

fn parse_arg(input: &mut ParseInput<'_>) -> Result<Self, CommandArgParseError>

source§

fn display() -> Parser

source§

impl CommandArg for f32

source§

fn parse_arg(input: &mut ParseInput<'_>) -> Result<Self, CommandArgParseError>

source§

fn display() -> Parser

source§

impl CommandArg for f64

source§

fn parse_arg(input: &mut ParseInput<'_>) -> Result<Self, CommandArgParseError>

source§

fn display() -> Parser

source§

impl CommandArg for i32

source§

fn parse_arg(input: &mut ParseInput<'_>) -> Result<Self, CommandArgParseError>

source§

fn display() -> Parser

source§

impl CommandArg for i64

source§

fn parse_arg(input: &mut ParseInput<'_>) -> Result<Self, CommandArgParseError>

source§

fn display() -> Parser

source§

impl CommandArg for u32

source§

fn parse_arg(input: &mut ParseInput<'_>) -> Result<Self, CommandArgParseError>

source§

fn display() -> Parser

source§

impl CommandArg for String

source§

fn parse_arg(input: &mut ParseInput<'_>) -> Result<Self, CommandArgParseError>

source§

fn display() -> Parser

source§

impl CommandArg for Color

source§

fn parse_arg(input: &mut ParseInput<'_>) -> Result<Self, CommandArgParseError>

source§

fn display() -> Parser

source§

impl CommandArg for GameMode

source§

fn parse_arg(input: &mut ParseInput<'_>) -> Result<Self, CommandArgParseError>

source§

fn display() -> Parser

Implementors§