Module show_notes::e021 [] [src]

Keeping your types under cover

Sponsors

(Thanks to the couple people donating who opted out of the reward tier, as well. You know who you are!)

Become a sponsor

Contact

Structs

EmailStruct

A "newtype" built by wrapping a String in a tuple struct.

ThingToDestructure

A simple thing to demonstrate destructuring

Enums

EmailEnum

A "newtype" built by wrapping a String in a single-variant enum.

Functions

send

A simple function showing you can use a String where an Email is required.

takes_a_str

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

Type Definitions

Email

A type alias for a string that is appropriate to use as an email address.