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.