A crate for deriving the Deref
and DerefMut traits from the standard
library onto structs with at least one field.
Examples
usederived_deref::{Deref, DerefMut};#[derive(Deref, DerefMut)]structStringWithCount{// Annotation of `#[target]` is required when there are two+ fields.
#[target]inner: String,
count:usize,
}// When there is only one field, annotation is optional instead.
#[derive(Deref, DerefMut)]structStringWrapper(String);#[derive(Deref, DerefMut)]structCountWrapper(#[target] usize);