# 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

```rust
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](https://unlicense.org/).

[`Deref`]: https://doc.rust-lang.org/std/ops/trait.Deref.html
[`DerefMut`]: https://doc.rust-lang.org/std/ops/trait.DerefMut.html
[`AsRef`]: https://doc.rust-lang.org/std/convert/trait.AsRef.html
[`AsMut`]: https://doc.rust-lang.org/std/convert/trait.AsMut.html
[`From`]: https://doc.rust-lang.org/std/convert/trait.From.html