2 releases

0.1.1 Feb 10, 2023
0.1.0 Feb 10, 2023

#11 in #deref-mut

Download history 56/week @ 2024-07-20 64/week @ 2024-07-27 67/week @ 2024-08-03 53/week @ 2024-08-10 52/week @ 2024-08-17 67/week @ 2024-08-24 78/week @ 2024-08-31 41/week @ 2024-09-07 67/week @ 2024-09-14 88/week @ 2024-09-21 53/week @ 2024-09-28 18/week @ 2024-10-05 41/week @ 2024-10-12 42/week @ 2024-10-19 59/week @ 2024-10-26 48/week @ 2024-11-02

190 downloads per month
Used in 20 crates (5 directly)

MIT/Apache

6KB
118 lines

pino_deref

Derive macro for Deref and DerefMut

crates.io docs.rs MIT/Apache 2.0

Example usage

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"));
}

lib.rs:

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"));
}

Dependencies

~1.5MB
~37K SLoC