mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
add argument type trait
This commit is contained in:
parent
bd87cbb443
commit
e3ecb607b8
1 changed files with 20 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
|||
pub trait ArgumentType<T> {
|
||||
// T parse(StringReader reader) throws CommandSyntaxException;
|
||||
|
||||
// default <S> CompletableFuture<Suggestions> listSuggestions(final CommandContext<S> context, final SuggestionsBuilder builder) {
|
||||
// return Suggestions.empty();
|
||||
// }
|
||||
|
||||
// default Collection<String> getExamples() {
|
||||
// return Collections.emptyList();
|
||||
// }
|
||||
|
||||
fn parse(reader: &mut StringReader) -> Result<T, CommandSyntaxError>;
|
||||
|
||||
fn list_suggestions<S>(
|
||||
context: &CommandContext<S>,
|
||||
builder: &mut SuggestionsBuilder,
|
||||
) -> Result<Suggestions, CommandSyntaxError>;
|
||||
|
||||
fn get_examples() -> Vec<String>;
|
||||
}
|
Loading…
Add table
Reference in a new issue