Crate plist

source ·
Expand description

§Plist

A rusty plist parser.

§Usage

Put this in your Cargo.toml:

[dependencies]
plist = "0.4"

And put this in your crate root:

extern crate plist;

§Examples

use plist::Value;

let value = Value::from_file("tests/data/xml.plist").unwrap();

match value {
    Value::Array(_array) => (),
    _ => ()
}
extern crate plist;
#[macro_use]
extern crate serde_derive;

#[derive(Deserialize)]
#[serde(rename_all = "PascalCase")]
struct Info {
    author: String,
    height: f32,
}

let info: Info = plist::from_file("tests/data/xml.plist").unwrap();

Modules§

  • An abstraction of a plist file as a stream of events. Used to support multiple encodings.

Structs§

  • A UTC timestamp. Used for serialization to and from the plist date type.
  • A structure that deserializes plist event streams into Rust values.
  • A structure that serializes Rust values plist event streams.

Enums§

Functions§

  • Deserializes an instance of type T from a plist file of any encoding.
  • Deserializes an instance of type T from a seekable byte stream containing a plist file of any encoding.
  • Deserializes an instance of type T from a byte stream containing an XML encoded plist file.
  • Serializes the given data structure as an XML encoded plist file.