fast_new_type 0.1.1

A proc_macro attribute to implement common traits for a custom type wrapping other.
Documentation
fast_new_type-0.1.1 has been yanked.

fast_new_type

This Rust library serves the purporse of implement of implement Deref,DerefMut,AsRef,AsMut and From in new types,either for the first value of a tuple struct,the "value" or "slot" field or the specified in the attribute.While you also can derive other traits on it.This procedural macro is no_std.

Usage

use fast_new_type::new_type;

#[new_type]
struct FirstField(u32, 16); 

#[new_type]
struct ValueField {
    value: u16,
    other_meta: u16,
}

#[new_type]
struct SlotField {
    slot: u16,
    other_meta: u16,
}

#[new_type(other, Copy, Clone)]
struct SpecField {
    other: u16,
    other_meta: u16,
}

License

This code is licensed under the Unlicense.