I used to have a site bookmarked with a table of all these functions, but the link is dead. Here's a matrix of Option and Result conversion functions. These become second nature once you have used Rust for any significant length of time, but it's useful to have a table reference.
For each of the below:
T
is the value possibly contained in an inputOk
Result
orSome
Option
.U
is a new value created by transforming or replacing an inputT
. Note that whenU
appears in methods likemap
,U ?= T
, for example by calling