官术网_书友最值得收藏!

  • Mastering Rust
  • Rahul Sharma Vesa Kaihlavirta
  • 115字
  • 2021-07-02 13:35:17

Collections

It's often the case that your program has to process more than one instance of data. For that, we have collection types. Depending on what you want and where your data resides in memory, Rust provides many kinds of built-in types to store a collection of data. First, we have arrays and tuples. Then, we have dynamic collection types in the standard library, of which we'll cover the most commonly used ones, that is, vectors (list of items) and maps (key/value items). Then, we also have references to collection types, called slices, which are basically a view into a contiguous piece of data owned by some other variable. Let's start with arrays first.

主站蜘蛛池模板: 清水河县| 吕梁市| 堆龙德庆县| 蓬溪县| 兴业县| 金门县| 丰台区| 枝江市| 台中市| 韶关市| 玛曲县| 福安市| 大荔县| 砀山县| 文昌市| 醴陵市| 都兰县| 磐安县| 湘潭市| 汉川市| 湛江市| 黔西县| 宁晋县| 资源县| 澎湖县| 卓资县| 东光县| 绥芬河市| 沅江市| 垫江县| 阜新| 江城| 深水埗区| 安新县| 房产| 微山县| 长汀县| 康保县| 沾益县| 临清市| 太仓市|