pub struct Argument {
pub name: String,
/* private fields */
}
Expand description
An argument node type. The T
type parameter is the type of the argument,
which can be anything.
Fields§
§name: String
Implementations§
Source§impl Argument
impl Argument
pub fn new(name: &str, parser: Arc<dyn ArgumentType + Send + Sync>) -> Self
pub fn parse( &self, reader: &mut StringReader, ) -> Result<Arc<dyn Any>, CommandSyntaxException>
pub fn list_suggestions(&self, builder: SuggestionsBuilder) -> Suggestions
pub fn examples(&self) -> Vec<String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Argument
impl !RefUnwindSafe for Argument
impl Send for Argument
impl Sync for Argument
impl Unpin for Argument
impl !UnwindSafe for Argument
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)