pub struct CommandArgument {
inner: SteelArgumentType,
}Expand description
An argument parser accepted by a public command node.
Fields§
§inner: SteelArgumentTypeImplementations§
Source§impl CommandArgument
impl CommandArgument
Sourcepub fn integer(minimum: i32, maximum: i32) -> Self
pub fn integer(minimum: i32, maximum: i32) -> Self
Creates a bounded signed 32-bit integer argument.
Sourcepub fn long(minimum: i64, maximum: i64) -> Self
pub fn long(minimum: i64, maximum: i64) -> Self
Creates a bounded signed 64-bit integer argument.
Sourcepub fn float(minimum: f32, maximum: f32) -> Self
pub fn float(minimum: f32, maximum: f32) -> Self
Creates a bounded 32-bit floating-point argument.
Sourcepub fn double(minimum: f64, maximum: f64) -> Self
pub fn double(minimum: f64, maximum: f64) -> Self
Creates a bounded 64-bit floating-point argument.
Sourcepub fn greedy_string() -> Self
pub fn greedy_string() -> Self
Creates an argument that consumes the remaining command input.
Sourcepub fn custom<P>(parser: P) -> Selfwhere
P: CommandArgumentParser,
pub fn custom<P>(parser: P) -> Selfwhere
P: CommandArgumentParser,
Erases a keyed extension parser without using Any or TypeId.
fn primitive(argument: ArgumentType) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for CommandArgument
impl !UnwindSafe for CommandArgument
impl Freeze for CommandArgument
impl Send for CommandArgument
impl Sync for CommandArgument
impl Unpin for CommandArgument
impl UnsafeUnpin 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreWraps this value in an
Arc<SyncMutex<>>