fast_new_type 0.1.2

A proc_macro attribute to implement common traits for a custom type wrapping other.
Documentation

fast_new_type

This crate serves the purporse of implement Deref,DerefMut,AsRef,AsMut and From in new types,either for the first value of a struct,the "value" or "slot" field or the specified in the attribute.

This crate 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)]
struct SpecField {
    other: u16,
    other_meta: u16,
}

License

This code is licensed under the Unlicense.