Function show_notes::e021::takes_a_str

source ·
pub fn takes_a_str(_some_str: &str)
Expand description

A function which takes a string, to use with Deref and EmailStruct.

E.g. you can do this:

let email_struct = EmailStruct("".into());

And likewise, with the enum variant:

let email_enum = EmailEnum::Address("".into());

Note, however, that the Deref implementation is much more complicated for the enum variant, as everything is in general.