easy-ext

Build Status version documentation license Rustc Version

An attribute macro for easily writing extension trait pattern.

Documentation

Usage

Add this to your Cargo.toml:

toml [dependencies] easy-ext = "0.1"

The current version of easy-ext requires Rust 1.31 or later.

Examples

```rust use easy_ext::ext;

[ext(ResultExt)]

impl Result { fn errinto(self) -> Result where E: Into, { self.maperr(Into::into) } } ```

Code like this will be generated:

```rust trait ResultExt { fn err_into(self) -> Result where E: Into; }

impl ResultExt for Result { fn errinto(self) -> Result where E: Into, { self.maperr(Into::into) } } ```

Supported items

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.