- Rust Programming By Example
- Guillaume Gomez Antoni Boucher
- 57字
- 2021-07-02 19:13:00
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.
推薦閱讀
- 大數(shù)據(jù)環(huán)境下圖書館文獻(xiàn)信息資源建設(shè)與利用
- 公共文化館治理研究(2015年):四川省文化館“十三五”規(guī)劃重大課題調(diào)研成果集
- 公益 創(chuàng)新 服務(wù)
- 中國古代戲曲目錄研究
- 高校圖書館閱讀推廣與宣傳促進(jìn)研究
- Hands-On Concurrency with Rust
- 海源閣史
- 《葉赫那拉氏族譜》整理與研究
- 云環(huán)境下我國綜合數(shù)字檔案館建設(shè)模式研究
- 基于知識治理的競爭情報協(xié)同模型研究
- 陜西古代文獻(xiàn)研究(第一輯)
- 讓文明得到更好的傳承:公共文化服務(wù)體系中公共檔案館發(fā)展戰(zhàn)略
- 檔案與少數(shù)民族記憶
- 中國富布賴特學(xué)友會(籌)論文集(2013)
- 數(shù)字信息環(huán)境下圖書館信息資源建設(shè)與共享