Enum plist::Plist
[−]
[src]
pub enum Plist { Array(Vec<Plist>), Dictionary(BTreeMap<String, Plist>), Boolean(bool), Data(Vec<u8>), Date(DateTime<UTC>), Real(f64), Integer(i64), String(String), }
Variants
Array(Vec<Plist>)
Dictionary(BTreeMap<String, Plist>)
Boolean(bool)
Data(Vec<u8>)
Date(DateTime<UTC>)
Real(f64)
Integer(i64)
String(String)
Methods
impl Plist
[src]
fn read<R: Read + Seek>(reader: R) -> Result<Plist>
fn from_events<T>(events: T) -> Result<Plist> where T: IntoIterator<Item=Result<PlistEvent>>
fn into_events(self) -> Vec<PlistEvent>
fn into_rustc_serialize_json(self) -> RustcJson
fn as_array(&self) -> Option<&Vec<Plist>>
If the Plist
is an Array, returns the associated Vec.
Returns None otherwise.
fn as_array_mut(&mut self) -> Option<&mut Vec<Plist>>
If the Plist
is an Array, returns the associated mutable Vec.
Returns None otherwise.
fn as_dictionary(&self) -> Option<&BTreeMap<String, Plist>>
If the Plist
is a Dictionary, returns the associated BTreeMap.
Returns None otherwise.
fn as_dictionary_mut(&mut self) -> Option<&mut BTreeMap<String, Plist>>
If the Plist
is a Dictionary, returns the associated mutable BTreeMap.
Returns None otherwise.
fn as_boolean(&self) -> Option<bool>
If the Plist
is a Boolean, returns the associated bool.
Returns None otherwise.
fn into_data(self) -> Option<Vec<u8>>
If the Plist
is a Data, returns the underlying Vec.
Returns None otherwise.
This method consumes the Plist
. If this is not desired, please use
as_data
method.
fn as_data(&self) -> Option<&[u8]>
If the Plist
is a Data, returns the associated Vec.
Returns None otherwise.
fn as_date(&self) -> Option<DateTime<UTC>>
If the Plist
is a Date, returns the associated DateTime.
Returns None otherwise.
fn as_real(&self) -> Option<f64>
If the Plist
is a Real, returns the associated f64.
Returns None otherwise.
fn as_integer(&self) -> Option<i64>
If the Plist
is an Integer, returns the associated i64.
Returns None otherwise.
fn into_string(self) -> Option<String>
If the Plist
is a String, returns the underlying String.
Returns None otherwise.
This method consumes the Plist
. If this is not desired, please use
as_string
method.
fn as_string(&self) -> Option<&str>
If the Plist
is a String, returns the associated str.
Returns None otherwise.
Trait Implementations
impl Clone for Plist
[src]
fn clone(&self) -> Plist
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Plist
[src]
impl PartialEq for Plist
[src]
fn eq(&self, __arg_0: &Plist) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Plist) -> bool
This method tests for !=
.