Is there a way to write this code with #[derive(Message)]
and #[rtype(result = "...")]
.
pub struct MyMsg<T> {
data: T
}
impl<T: 'static> Message for MyMsg<T> {
type Result = Result<MyMsg<T>, Error>;
}
I tried this but the compiler complains about the required lifetime bounds.
#[derive(Message)]
#[rtype(result = "Result<MyMsg<T>, Error>")]
pub struct MyMsg<T> {
pub data: T,
}