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

Storing and Retrieving Data

A typical need of any software application is to input/output data by reading/writing data files or data streams or by querying/manipulating a database. Regarding files and streams, unstructured data, or even binary data, is hard to manipulate, and so they are not recommended.

Also, proprietary data formats are not recommended because of the vendor lock-in risk, and so only standard data formats should be used. Fortunately, there are free Rust libraries that come to the rescue in these situations. There are Rust crates available to manipulate some of the most popular file formats, such as TOML, JSON, and XML.

In terms of databases, there are Rust crates to manipulate data using some of the most popular databases, such as SQLite, PostgreSQL, and Redis.

In this chapter, you will learn about the following:

  • How to read configuration data from a TOML file
  • How to read or write a JSON data file
  • How to read an XML data file
  • How to query or manipulate data in a SQLite database
  • How to query or manipulate data in a PostgreSQL database
  • How to query or manipulate data in a Redis database
主站蜘蛛池模板: 化州市| 松桃| 宽城| 余庆县| 霍邱县| 灵璧县| 涿鹿县| 徐州市| 阳新县| 张家界市| 商洛市| 宁陕县| 和硕县| 桂平市| 将乐县| 涿州市| 岑巩县| 长葛市| 大连市| 买车| 邵东县| 涞源县| 德阳市| 如皋市| 高清| 宁化县| 健康| 麻江县| 车险| 清新县| 峨眉山市| 凤城市| 揭东县| 广安市| 卫辉市| 泾川县| 双峰县| 耒阳市| 昌邑市| 六盘水市| 四川省|