![Rust Programming By Example](https://wfqqreader-1252317822.image.myqcloud.com/cover/324/36700324/b_36700324.jpg)
上QQ阅读APP看书,第一时间看更新
The Option type
Generics can also be used in a type. The Option type from the standard library is a generic type, defined as such:
enum Option<T> { Some(T), None, }
This type is useful to encode the possibility of the absence of a value. None means no value, while Some(value) is used when there's a value.