pub enum ScalarStyle {
Plain,
SingleQuoted,
DoubleQuoted,
Literal(Chomp),
Folded(Chomp),
}Expand description
The style in which a scalar value was written in the source.
Variants§
Plain
An unquoted plain scalar (YAML 1.2 §7.3.3).
SingleQuoted
A 'single-quoted' scalar (YAML 1.2 §7.3.2).
DoubleQuoted
A "double-quoted" scalar (YAML 1.2 §7.3.1).
Literal(Chomp)
A | literal block scalar (YAML 1.2 §8.1.2).
Folded(Chomp)
A > folded block scalar (YAML 1.2 §8.1.3).
Line folding is applied to the collected content: a single line break
between two equally-indented non-blank lines becomes a space; N blank
lines between non-blank lines produce N newlines; more-indented lines
preserve their relative leading whitespace and the line break before
them is kept as \n rather than folded to a space. Callers must not
treat the value as whitespace-safe — more-indented lines can inject
arbitrary leading spaces into the parsed value.
Trait Implementations§
Source§impl Clone for ScalarStyle
impl Clone for ScalarStyle
Source§fn clone(&self) -> ScalarStyle
fn clone(&self) -> ScalarStyle
Returns a duplicate of the value. Read more
1.0.0 · 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 ScalarStyle
impl Debug for ScalarStyle
Source§impl PartialEq for ScalarStyle
impl PartialEq for ScalarStyle
impl Copy for ScalarStyle
impl Eq for ScalarStyle
impl StructuralPartialEq for ScalarStyle
Auto Trait Implementations§
impl Freeze for ScalarStyle
impl RefUnwindSafe for ScalarStyle
impl Send for ScalarStyle
impl Sync for ScalarStyle
impl Unpin for ScalarStyle
impl UnsafeUnpin for ScalarStyle
impl UnwindSafe for ScalarStyle
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