Module show_notes::e003

source ·
Expand description

No. more. nulls.

  • Date: October 21, 2015
  • Subject: Enumerated (enum) types, pattern matching, and meaningful return values.
  • Audio

Structs

Enums

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

Functions

  • Shows how the result of an enum comes back as increasingly complex data.
  • Shows in a bit more detail how match works.
  • Shows how an option type works in practice.
  • Shows how a Result type works in practice.
  • Shows how to return either a meaningful result or an error as an enum.
  • Shows how this is used in a more meaningful context, with a standard type.
  • Shows how returning a RelatedishThings::ComplexData instance works.
  • get_name 🔒
    Shows how returning a RelatedishThings::SomeName instance works.
  • Shows how returning a RelatedishThings::ReusedStructure instance works.
  • get_unit 🔒
    Shows how returning a RelatedishThings::Unit instance works.
  • get_value 🔒
    Shows how returning a RelatedishThings::SomeValue instance works.