pub struct CommandArgs { /* private fields */ }Expand description
Parsed command arguments accessible by name.
Built by the framework after validating the raw argument string against the command’s declared arguments.
Implementations§
Source§impl CommandArgs
impl CommandArgs
Sourcepub fn get_string(&self, name: &str) -> Option<&str>
pub fn get_string(&self, name: &str) -> Option<&str>
Gets a string argument by name.
Sourcepub fn get_integer(&self, name: &str) -> Option<i64>
pub fn get_integer(&self, name: &str) -> Option<i64>
Gets an integer argument by name.
Sourcepub fn get_double(&self, name: &str) -> Option<f64>
pub fn get_double(&self, name: &str) -> Option<f64>
Gets a double argument by name.
Sourcepub fn get_vec3(&self, name: &str) -> Option<(f64, f64, f64)>
pub fn get_vec3(&self, name: &str) -> Option<(f64, f64, f64)>
Gets a Vec3 argument by name (x, y, z as f64).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommandArgs
impl RefUnwindSafe for CommandArgs
impl Send for CommandArgs
impl Sync for CommandArgs
impl Unpin for CommandArgs
impl UnsafeUnpin for CommandArgs
impl UnwindSafe for CommandArgs
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