27 lines
853 B
Rust
27 lines
853 B
Rust
#[macro_export]
|
|
macro_rules! message {
|
|
($name:ident: $value:ty: $docs:literal) => {
|
|
git_next_config::newtype!($name: $value: $docs);
|
|
impl actix::prelude::Message for $name {
|
|
type Result = ();
|
|
}
|
|
};
|
|
($name:ident: $docs:literal) => {
|
|
git_next_config::newtype!($name: $docs);
|
|
impl actix::prelude::Message for $name {
|
|
type Result = ();
|
|
}
|
|
};
|
|
($name:ident: $value:ty => $result:ty: $docs:literal) => {
|
|
git_next_config::newtype!($name is a $value: $docs);
|
|
impl actix::prelude::Message for $name {
|
|
type Result = $result;
|
|
}
|
|
};
|
|
($name:ident => $result:ty: $docs:literal) => {
|
|
git_next_config::newtype!($name: $docs);
|
|
impl actix::prelude::Message for $name {
|
|
type Result = $result;
|
|
}
|
|
};
|
|
}
|