Crate pino_deref

source ·
Expand description

Derive macro for Deref and DerefMut

use pino_deref::{Deref, DerefMut};

#[derive(Deref, DerefMut)]
struct Nametag(pub String);

fn main() {
    let nametag = Nametag("pinosaur".into());
    assert_eq!(*nametag, String::from("pinosaur"));
}

Derive Macros