How it works...

As always with Serde, we first need to declare the structures we plan on using [8 to 32].

While serializing, we can directly call Serde's to_string method with a structure as TOML re-exports them [77]. This returns a String that we can then write into a file [79]. The same is true of Serde's from_str, which, when type-annotated, takes a &str and converts it into a structure.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.237.29