synonym 0.1.7

Customizable derive macro to create newtypes. It peeks into the underlying type to choose which traits should be implemented.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#![allow(dead_code)]

use synonym::Synonym;

struct String;

#[derive(Synonym)]
struct LocalString(Box<str>);

fn main() {
    let _ = LocalString::from("abc".to_string());
}