Skip to main content

Crate maybe_fut_unwrap_derive

Crate maybe_fut_unwrap_derive 

Source
Expand description

§maybe-fut-unwrap-derive

A procedural macro which exposes the unwrap method for MaybeFuture types.

§Example

#[derive(Unwrap)]
#[unwrap_types(std(std::fs::File), tokio(tokio::fs::File))]
struct MyWrapper(InnerWrapper);

enum InnerWrapper {
   Std(std::fs::File),
   Tokio(tokio::fs::File),
}

Derive Macros§

Unwrap