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

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

主站蜘蛛池模板: 九江市| 哈巴河县| 保靖县| 泰兴市| 南充市| 舟曲县| 林州市| 延安市| 东源县| 墨脱县| 云林县| 西乌珠穆沁旗| 甘孜| 团风县| 英德市| 资兴市| 柳州市| 柳州市| 湘潭市| 溧水县| 万盛区| 桃园市| 甘洛县| 荆州市| 五莲县| 闽清县| 克什克腾旗| 黎川县| 沈阳市| 油尖旺区| 长沙市| 葫芦岛市| 江城| 汶上县| 雷山县| 新津县| 永吉县| 外汇| 攀枝花市| 山阴县| 南川市|