pub enum YamlVersion {
V1_1,
V1_2,
}Expand description
YAML spec version, derived from a %YAML major.minor directive or
defaulted when no directive is present.
Variants§
Implementations§
Source§impl YamlVersion
impl YamlVersion
Sourcepub const fn from_directive(major: u8, minor: u8) -> Self
pub const fn from_directive(major: u8, minor: u8) -> Self
Convert a parsed (major, minor) directive pair into a YamlVersion.
1.1 selects Self::V1_1. Any other 1.x selects Self::V1_2
(the 1.2.2 spec states that 1.x documents must be processed by the
most-recent 1.x parser).
Trait Implementations§
Source§impl Clone for YamlVersion
impl Clone for YamlVersion
Source§fn clone(&self) -> YamlVersion
fn clone(&self) -> YamlVersion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for YamlVersion
impl Debug for YamlVersion
Source§impl Default for YamlVersion
impl Default for YamlVersion
Source§fn default() -> YamlVersion
fn default() -> YamlVersion
Returns the “default value” for a type. Read more
Source§impl PartialEq for YamlVersion
impl PartialEq for YamlVersion
Source§fn eq(&self, other: &YamlVersion) -> bool
fn eq(&self, other: &YamlVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for YamlVersion
impl Eq for YamlVersion
impl StructuralPartialEq for YamlVersion
Auto Trait Implementations§
impl Freeze for YamlVersion
impl RefUnwindSafe for YamlVersion
impl Send for YamlVersion
impl Sync for YamlVersion
impl Unpin for YamlVersion
impl UnsafeUnpin for YamlVersion
impl UnwindSafe for YamlVersion
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.