pub enum StringStyle {
Quoted,
Literal,
DelimitedLitStr(u8),
DelimitedCode(u8),
}Expand description
Syntax style for string keys (for round-trip formatting).
This preserves whether a string key was written with quotes, single quotes, or delimiters,
similar to how SyntaxHint preserves code block formatting.
Variants§
Quoted
Quoted string: "..."
Literal
Literal string (single-quoted): '...'
Content is taken literally, no escape processing
DelimitedLitStr(u8)
Delimited literal string: <'...'>, <<'...'>>, <<<'...'>>>
The u8 indicates the delimiter level (1, 2, or 3)
Content is taken literally, no escape processing
DelimitedCode(u8)
Delimited code: <…>, <<…>>, <<<…>>>
The u8 indicates the delimiter level (1, 2, or 3)
Trait Implementations§
Source§impl Clone for StringStyle
impl Clone for StringStyle
Source§fn clone(&self) -> StringStyle
fn clone(&self) -> StringStyle
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 StringStyle
impl Debug for StringStyle
Source§impl Default for StringStyle
impl Default for StringStyle
Source§fn default() -> StringStyle
fn default() -> StringStyle
Returns the “default value” for a type. Read more
Source§impl PartialEq for StringStyle
impl PartialEq for StringStyle
impl Copy for StringStyle
impl Eq for StringStyle
impl StructuralPartialEq for StringStyle
Auto Trait Implementations§
impl Freeze for StringStyle
impl RefUnwindSafe for StringStyle
impl Send for StringStyle
impl Sync for StringStyle
impl Unpin for StringStyle
impl UnwindSafe for StringStyle
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.