pub enum Format {
Xml,
Binary,
OpenStep,
GnuStep,
}Expand description
A property-list serialization format.
One constant per wire format. Pass one to an
encoder to choose the wire format explicitly; the decoder reports the
variant it detected. The enum is deliberately exhaustive: a fifth format
would be a semver-major event, and downstream match needs no wildcard.
Variants§
Xml
Apple XML property list (<?xml ...?> + <!DOCTYPE plist ...>).
Binary
Apple binary property list (bplist00).
OpenStep
OpenStep ASCII property list.
GnuStep
GNUStep ASCII property list — OpenStep with typed <*...> literals.
Implementations§
Trait Implementations§
impl Copy for Format
impl Eq for Format
Source§impl FromStr for Format
Parses a format from its name, case-insensitively.
impl FromStr for Format
Parses a format from its name, case-insensitively.
Accepts exactly the four Format::name spellings in any ASCII case, so
parsing round-trips with Display.
§Errors
Returns Error::Message when the input matches none of the four names.
§Examples
use apple_plist::Format;
assert_eq!("xml".parse::<Format>().ok(), Some(Format::Xml));
assert_eq!("GNUSTEP".parse::<Format>().ok(), Some(Format::GnuStep));
assert!("plist".parse::<Format>().is_err());impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.