mirror of https://github.com/Trivernis/bromine.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
400 B
Rust
20 lines
400 B
Rust
#[macro_export]
|
|
macro_rules! callback {
|
|
($cb:ident) => {
|
|
|ctx, event| Box::pin($cb(ctx, event))
|
|
};
|
|
($cb:path) => {
|
|
|ctx, event| Box::pin($cb(ctx, event))
|
|
};
|
|
($ctx:ident, $event:ident,$cb:expr) => {
|
|
move |$ctx, $event| Box::pin($cb)
|
|
};
|
|
}
|
|
|
|
#[macro_export]
|
|
macro_rules! namespace {
|
|
($nsp:path) => {
|
|
Namespace::from_provider::<$nsp>()
|
|
};
|
|
}
|