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