[][src]Function show_notes::e021::takes_a_str

pub fn takes_a_str(_some_str: &str)

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

E.g. you can do this:

let email_struct = EmailStruct("[email protected]".into());

And likewise, with the enum variant:

let email_enum = EmailEnum::Address("[email protected]".into());

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