[][src]Crate plist

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

stream

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

Structs

Date

A UTC timestamp. Used for serialization to and from the plist date type.

Deserializer

A structure that deserializes plist event streams into Rust values.

Serializer

A structure that serializes Rust values plist event streams.

Enums

Error
Value

Represents any plist value.

Functions

from_file

Deserializes an instance of type T from a plist file of any encoding.

from_reader

Deserializes an instance of type T from a seekable byte stream containing a plist file of any encoding.

from_reader_xml

Deserializes an instance of type T from a byte stream containing an XML encoded plist file.

to_writer_xml

Serializes the given data structure as an XML encoded plist file.