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

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
主站蜘蛛池模板: 宁南县| 南宫市| 临武县| 大兴区| 星子县| 惠州市| 千阳县| 白水县| 安塞县| 阳信县| 寻乌县| 巴林右旗| 晋州市| 六枝特区| 莱芜市| 女性| 松潘县| 桦川县| 化德县| 合山市| 明水县| 广昌县| 满洲里市| 天等县| 界首市| 上思县| 东乌珠穆沁旗| 抚顺县| 通化县| 香河县| 舞钢市| 南江县| 玉树县| 密云县| 淮北市| 宝丰县| 兰溪市| 汝州市| 孟州市| 长宁县| 宣威市|