diff options
| author | Edward Barnard | 2018-10-06 20:03:19 +0100 |
|---|---|---|
| committer | Edward Barnard | 2018-10-06 20:03:19 +0100 |
| commit | 68f412c2bd440733226e5a463c542323000454e4 (patch) | |
| tree | fdaac7f2f91b033e18ee4dd6634de40359856df0 /src | |
| parent | a1ab2a2550ed444828a8c76aaa8861268faeca33 (diff) | |
| download | rust-plist-68f412c2bd440733226e5a463c542323000454e4.tar.bz2 | |
Minor doc improvements.
Diffstat (limited to 'src')
| -rw-r--r-- | src/de.rs | 1 | ||||
| -rw-r--r-- | src/events/binary_reader.rs | 4 | ||||
| -rw-r--r-- | src/events/mod.rs | 3 | ||||
| -rw-r--r-- | src/ser.rs | 1 |
4 files changed, 7 insertions, 2 deletions
@@ -43,6 +43,7 @@ impl de::Error for Error { } } +/// A structure that deserializes plist event streams into Rust values. pub struct Deserializer<I> where I: IntoIterator<Item = Result<Event, Error>>, diff --git a/src/events/binary_reader.rs b/src/events/binary_reader.rs index 6068545..7da48d5 100644 --- a/src/events/binary_reader.rs +++ b/src/events/binary_reader.rs @@ -29,8 +29,8 @@ enum StackType { Root, } -/// https://opensource.apple.com/source/CF/CF-550/CFBinaryPList.c -/// https://hg.python.org/cpython/file/3.4/Lib/plistlib.py +// https://opensource.apple.com/source/CF/CF-550/CFBinaryPList.c +// https://hg.python.org/cpython/file/3.4/Lib/plistlib.py pub struct BinaryReader<R> { stack: Vec<StackItem>, object_offsets: Vec<u64>, diff --git a/src/events/mod.rs b/src/events/mod.rs index cf5aa67..9d71698 100644 --- a/src/events/mod.rs +++ b/src/events/mod.rs @@ -1,3 +1,5 @@ +//! An abstraction of a plist file as a set of events. Used to support multiple encodings. + mod binary_reader; pub use self::binary_reader::BinaryReader; @@ -90,6 +92,7 @@ impl<R: Read + Seek> Iterator for Reader<R> { } } +/// Supports writing event streams in different plist encodings. pub trait Writer { fn write(&mut self, event: &Event) -> Result<(), Error>; } @@ -12,6 +12,7 @@ impl ser::Error for Error { } } +/// A structure that serializes Rust values plist event streams. pub struct Serializer<W: Writer> { writer: W, } |
