macro_rules! impl_one_of {
($enum_name:ident ; $head_variant:ident, $($tail_variants:ident),*) => { ... };
}Expand description
Macro to implement custom OneOf type.
Example:
use one_of_futures::impl_one_of;
impl_one_of!(MyEither;
Left,
Right
);
fn main() {
let either = match 1 {
0 => MyEither::Left(async { 1 }),
_ => MyEither::Right(async { 2 }),
};
}