Module show_notes::e003 [] [src]

No. more. nulls.

Notes

Today's episode discusses, in order:

Order

There is a specific order to the examples below, and it is not the automatically-alphabetized order rendered by rustdoc. Instead, you should work through in the sequence they appear in the source:

  1. RelatedishThings
  2. demonstrate_basic_enumeration
  3. demonstrate_match
  4. get_an_option
  5. demonstrate_option
  6. get_a_result
  7. demonstrate_result

Follow/Support

Structs

PreexistingStruct

Just exists to be used as an element in RelatedishThings.

Enums

RelatedishThings

An enumeration can hold a variety of types. This one shows you a few.

Functions

demonstrate_basic_enumeration

Shows how the result of an enum comes back as increasingly complex data.

demonstrate_match

Shows in a bit more detail how match works.

demonstrate_option

Shows how an option type works in practice.

demonstrate_result

Shows how a Result type works in practice.

get_a_result

Shows how to return either a meaningful result or an error as an enum.

get_an_option

Shows how this is used in a more meaningful context, with a standard type.