azalea-brigadier

Crates.ioazalea-brigadier
lib.rsazalea-brigadier
version
sourcesrc
created_at2022-09-05 15:07:45.631155
updated_at2024-12-21 01:31:42.869143
descriptionA port of Mojang's Brigadier command parsing and dispatching library.
homepage
repositoryhttps://github.com/azalea-rs/azalea
max_upload_size
id658897
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
mat (mat-1)

documentation

README

Azalea Brigadier

A Rust port of Mojang's Brigadier command parsing and dispatching library.

Examples

use azalea_brigadier::prelude::*;
use std::sync::Arc;

#[derive(Debug, PartialEq)]
struct CommandSource {}

let mut subject = CommandDispatcher::new();
subject.register(literal("foo").executes(|_| 42));

assert_eq!(
    subject
        .execute("foo", Arc::new(CommandSource {}))
        .unwrap(),
    42
);

See the tests for more.

Commit count: 1257

cargo fmt