[−][src]Enum creator_plist::Value
Represents any plist value.
Variants
Dictionary(Dictionary)
Boolean(bool)
Date(Date)
Real(f64)
Integer(Integer)
String(String)
Uid(Uid)
Implementations
impl Value
[src]
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Value, Error>
[src]
Reads a Value
from a plist file of any encoding.
pub fn from_reader<R: Read + Seek>(reader: R) -> Result<Value, Error>
[src]
Reads a Value
from a seekable byte stream containing a plist of any encoding.
pub fn from_reader_xml<R: Read>(reader: R) -> Result<Value, Error>
[src]
Reads a Value
from a seekable byte stream containing an XML encoded plist.
pub fn to_file_binary<P: AsRef<Path>>(&self, path: P) -> Result<(), Error>
[src]
Serializes a Value
to a file as a binary encoded plist.
pub fn to_file_xml<P: AsRef<Path>>(&self, path: P) -> Result<(), Error>
[src]
Serializes a Value
to a file as an XML encoded plist.
pub fn to_writer_binary<W: Write>(&self, writer: W) -> Result<(), Error>
[src]
Serializes a Value
to a byte stream as a binary encoded plist.
pub fn to_writer_xml<W: Write>(&self, writer: W) -> Result<(), Error>
[src]
Serializes a Value
to a byte stream as an XML encoded plist.
pub fn into_array(self) -> Option<Vec<Value>>
[src]
If the Value
is a Array, returns the underlying Vec
.
Returns None
otherwise.
This method consumes the Value
. To get a reference instead, use
as_array
.
pub fn as_array(&self) -> Option<&Vec<Value>>
[src]
If the Value
is an Array, returns the associated Vec
.
Returns None
otherwise.
pub fn as_array_mut(&mut self) -> Option<&mut Vec<Value>>
[src]
If the Value
is an Array, returns the associated mutable Vec
.
Returns None
otherwise.
pub fn into_dictionary(self) -> Option<Dictionary>
[src]
If the Value
is a Dictionary, returns the associated BTreeMap
.
Returns None
otherwise.
This method consumes the Value
. To get a reference instead, use
as_dictionary
.
pub fn as_dictionary(&self) -> Option<&Dictionary>
[src]
If the Value
is a Dictionary, returns the associated BTreeMap
.
Returns None
otherwise.
pub fn as_dictionary_mut(&mut self) -> Option<&mut Dictionary>
[src]
If the Value
is a Dictionary, returns the associated mutable BTreeMap
.
Returns None
otherwise.
pub fn as_boolean(&self) -> Option<bool>
[src]
If the Value
is a Boolean, returns the associated bool
.
Returns None
otherwise.
pub fn into_data(self) -> Option<Vec<u8>>
[src]
If the Value
is a Data, returns the underlying Vec
.
Returns None
otherwise.
This method consumes the Value
. If this is not desired, please use
as_data
method.
pub fn as_data(&self) -> Option<&[u8]>
[src]
If the Value
is a Data, returns the associated Vec
.
Returns None
otherwise.
pub fn as_date(&self) -> Option<Date>
[src]
If the Value
is a Date, returns the associated Date
.
Returns None
otherwise.
pub fn as_real(&self) -> Option<f64>
[src]
If the Value
is a Real, returns the associated f64
.
Returns None
otherwise.
pub fn as_signed_integer(&self) -> Option<i64>
[src]
If the Value
is a signed Integer, returns the associated i64
.
Returns None
otherwise.
pub fn as_unsigned_integer(&self) -> Option<u64>
[src]
If the Value
is an unsigned Integer, returns the associated u64
.
Returns None
otherwise.
pub fn into_string(self) -> Option<String>
[src]
If the Value
is a String, returns the underlying String
.
Returns None
otherwise.
This method consumes the Value
. If this is not desired, please use
as_string
method.
pub fn as_string(&self) -> Option<&str>
[src]
If the Value
is a String, returns the associated str
.
Returns None
otherwise.
Trait Implementations
impl Clone for Value
[src]
impl Debug for Value
[src]
impl<'a> From<&'a Date> for Value
[src]
impl<'a> From<&'a bool> for Value
[src]
impl<'a> From<&'a f32> for Value
[src]
impl<'a> From<&'a f64> for Value
[src]
impl<'a> From<&'a i16> for Value
[src]
impl<'a> From<&'a i32> for Value
[src]
impl<'a> From<&'a i64> for Value
[src]
impl<'a> From<&'a i8> for Value
[src]
impl<'a> From<&'a str> for Value
[src]
impl<'a> From<&'a u16> for Value
[src]
impl<'a> From<&'a u32> for Value
[src]
impl<'a> From<&'a u64> for Value
[src]
impl<'a> From<&'a u8> for Value
[src]
impl From<Date> for Value
[src]
impl From<Dictionary> for Value
[src]
pub fn from(from: Dictionary) -> Value
[src]
impl From<String> for Value
[src]
impl From<Vec<Value, Global>> for Value
[src]
impl From<bool> for Value
[src]
impl From<f32> for Value
[src]
impl From<f64> for Value
[src]
impl From<i16> for Value
[src]
impl From<i32> for Value
[src]
impl From<i64> for Value
[src]
impl From<i8> for Value
[src]
impl From<u16> for Value
[src]
impl From<u32> for Value
[src]
impl From<u64> for Value
[src]
impl From<u8> for Value
[src]
impl PartialEq<Value> for Value
[src]
impl StructuralPartialEq for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
[src]
impl Send for Value
[src]
impl Sync for Value
[src]
impl Unpin for Value
[src]
impl UnwindSafe for Value
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,