pub enum PlainScalarType {
Null,
Bool(bool),
Int(i64),
Float(f64),
Str,
Value,
}Expand description
Result of resolving a plain (unquoted) scalar to a YAML type.
This is used by every composer variant to share implicit-resolution logic. Each composer maps the variants to its own value type.
Variants§
Null
Null (null, Null, NULL, ~).
Bool(bool)
Boolean — under YAML 1.2 only true/false (any case); under
YAML 1.1 also yes/no/on/off.
Int(i64)
64-bit signed integer (decimal).
Float(f64)
64-bit float.
Str
Falls through to a string — the caller keeps the original input.
Value
YAML 1.1 tag:yaml.org,2002:value (the bare = indicator,
§10.3.4 of the 1.1 spec). Dropped from the 1.2 Core Schema, so
the resolver only emits this under a %YAML 1.1 directive.
Composers should reject it — there is no Value variant in the
user-facing tree to construct it into. This mirrors
ruamel.yaml typ="safe" / typ="unsafe", both of which raise
ConstructorError.
Trait Implementations§
Source§impl Clone for PlainScalarType
impl Clone for PlainScalarType
Source§fn clone(&self) -> PlainScalarType
fn clone(&self) -> PlainScalarType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlainScalarType
impl Debug for PlainScalarType
Source§impl PartialEq for PlainScalarType
impl PartialEq for PlainScalarType
Source§fn eq(&self, other: &PlainScalarType) -> bool
fn eq(&self, other: &PlainScalarType) -> bool
self and other values to be equal, and is used by ==.