#[non_exhaustive]pub enum ScalarStyle {
Plain,
SingleQuoted,
DoubleQuoted,
Literal,
Folded,
MultilineBasic,
MultilineLiteral,
}Available on crate features
json or toml or yaml only.Expand description
How a scalar is written.
A TOML basic string is Self::DoubleQuoted, a literal string
Self::SingleQuoted, and a TOML number, boolean or datetime
Self::Plain. A JSON string and each JSON key are
Self::DoubleQuoted, and a JSON number, true, false and null are
Self::Plain.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Plain
No quotes: a YAML plain scalar, a bare TOML key, or a TOML number, boolean or datetime.
SingleQuoted
A YAML single-quoted scalar, or a TOML literal string '…'.
DoubleQuoted
A YAML double-quoted scalar, or a TOML basic string "…".
Literal
A YAML literal block scalar, |.
Folded
A YAML folded block scalar, >.
MultilineBasic
A TOML multi-line basic string, """…""".
MultilineLiteral
A TOML multi-line literal string, '''…'''.
Trait Implementations§
Source§impl Clone for ScalarStyle
impl Clone for ScalarStyle
impl Copy for ScalarStyle
Source§impl Debug for ScalarStyle
impl Debug for ScalarStyle
impl Eq for ScalarStyle
Source§impl PartialEq for ScalarStyle
impl PartialEq for ScalarStyle
impl StructuralPartialEq for ScalarStyle
Auto Trait Implementations§
impl Forget for ScalarStyle
impl Freeze for ScalarStyle
impl Move 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