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

  • 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.

主站蜘蛛池模板: 乳源| 西林县| 潞西市| 石景山区| 武清区| 益阳市| 绥滨县| 宜兰县| 永胜县| 泰顺县| 黑龙江省| 濮阳市| 鄱阳县| 沅陵县| 金秀| 通化县| 邵东县| 姚安县| 措勤县| 科技| 泰来县| 滁州市| 泰和县| 兴山县| 万盛区| 彝良县| 平度市| 平阴县| 南开区| 阿合奇县| 搜索| 全州县| 大关县| 沾化县| 泰顺县| 兴文县| 东台市| 三河市| 疏附县| 绵竹市| 辉南县|