aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Barnard2018-10-06 20:03:19 +0100
committerEdward Barnard2018-10-06 20:03:19 +0100
commit68f412c2bd440733226e5a463c542323000454e4 (patch)
treefdaac7f2f91b033e18ee4dd6634de40359856df0 /src
parenta1ab2a2550ed444828a8c76aaa8861268faeca33 (diff)
downloadrust-plist-68f412c2bd440733226e5a463c542323000454e4.tar.bz2
Minor doc improvements.
Diffstat (limited to 'src')
-rw-r--r--src/de.rs1
-rw-r--r--src/events/binary_reader.rs4
-rw-r--r--src/events/mod.rs3
-rw-r--r--src/ser.rs1
4 files changed, 7 insertions, 2 deletions
diff --git a/src/de.rs b/src/de.rs
index 7157ff0..173bc7b 100644
--- a/src/de.rs
+++ b/src/de.rs
@@ -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>;
}
diff --git a/src/ser.rs b/src/ser.rs
index f20ab13..e00bca7 100644
--- a/src/ser.rs
+++ b/src/ser.rs
@@ -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,
}