Skip to content

Derive macros for Rust's bottom type core::convert::Infallible

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rjacraft/nevermore

Repository files navigation

nevermore

crates.io version crates.io downloads docs.rs

Derive macros for Rust's bottom type core::convert::Infallible.

Features

FromNever

This derive macro automatically generates From<Infallible> implementation on the type:

#[derive(nevermore::FromNever)]
struct User {
    name: String,
    age: u8,
}

will generate something similar to

impl From<Infallible> for User {
    fn from(infallible: Infallible) {
        match infallible {}
    }
}

About

Derive macros for Rust's bottom type core::convert::Infallible

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages