Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View aviau's full-sized avatar

Alexandre Viau aviau

View GitHub Profile

Rust Error Handling Cheatsheet - Result handling functions

Introduction to Rust error handling

Rust error handling is nice but obligatory. Which makes it sometimes plenty of code.

Functions return values of type Result that is "enumeration". In Rust enumeration means complex value that has alternatives and that alternative is shown with a tag.

Result is defined as Ok or Err. The definition is generic, and both alternatives have

Keybase proof

I hereby claim:

  • I am aviau on github.
  • I am aviau (https://keybase.io/aviau) on keybase.
  • I have a public key whose fingerprint is E301 54F5 429F FBB9 B22E 49C2 DA82 830E 3CCC 3A3A

To claim this, I am signing this object: