Quite commonly I have to create two newtypes: one owned, one with a reference. Example struct Email(String) and struct EmailRef(&self). Seems like a common pattern where different ownership type needs a different newtype.
Is there any existing crate to do that? My search-fu is failing me.
In that case the usual idiom is "not to hide the & / &mut nature of the type", at least when dealing with Sized types such as String: to "just" newtype the owned variant, and use:
as a helper crate to derive &String → &Email and &mut String → &mut Email casts