diff options
| author | mat <git@matdoes.dev> | 2026-05-06 18:38:23 -0545 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-05-07 08:05:58 -1200 |
| commit | cabc8b60a729ba17f5b75f7a7956c6d1ddcc8919 (patch) | |
| tree | 237fd12a9768fe7431ce42dfbdde60f4c7850e06 /azalea/src/lib.rs | |
| parent | 9ffd0e80bbb3feace231553d6539124585b03e3c (diff) | |
| download | azalea-drasl-cabc8b60a729ba17f5b75f7a7956c6d1ddcc8919.tar.xz | |
azalea-brigadier now allows commands to return a Result
Diffstat (limited to 'azalea/src/lib.rs')
| -rw-r--r-- | azalea/src/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs index 3a2bc0cf..8c29e2c3 100644 --- a/azalea/src/lib.rs +++ b/azalea/src/lib.rs @@ -66,11 +66,16 @@ use futures::future::BoxFuture; pub use join_opts::JoinOpts; pub use crate::{ - client_impl::{Client, StartClientOpts}, + client_impl::{Client, StartClientOpts, error}, entity_ref::EntityRef, events::Event, }; +// for convenience, adds the alias `azalea::Result` instead of +// `azalea::error::AzaleaResult`. the user should probably be using anyhow/eyre, +// but in some cases they may prefer to have the errors more strictly defined. +pub type Result<T> = error::AzaleaResult<T>; + pub type BoxHandleFn<S, R> = Box<dyn Fn(Client, Event, S) -> BoxFuture<'static, R> + Send>; pub type HandleFn<S, Fut> = fn(Client, Event, S) -> Fut; |
