pub enum QuoteStyle {
AlwaysDouble,
AlwaysSingle,
PreferDouble,
PreferSingle,
}
Expand description
How to decide to use single or double quotes.
Variants§
AlwaysDouble
Always use double quotes.
AlwaysSingle
Always use single quotes.
PreferDouble
Prefer using double quotes except in scenarios where the string contains more double quotes than single quotes.
PreferSingle
Prefer using single quotes except in scenarios where the string contains more single quotes than double quotes.
Implementations§
source§impl QuoteStyle
impl QuoteStyle
sourcepub fn to_jsx_quote_style(&self) -> JsxQuoteStyle
pub fn to_jsx_quote_style(&self) -> JsxQuoteStyle
Gets the associated JSX quote style.
Trait Implementations§
source§impl Clone for QuoteStyle
impl Clone for QuoteStyle
source§fn clone(&self) -> QuoteStyle
fn clone(&self) -> QuoteStyle
Returns a copy 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<'de> Deserialize<'de> for QuoteStyle
impl<'de> Deserialize<'de> for QuoteStyle
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FromStr for QuoteStyle
impl FromStr for QuoteStyle
source§impl PartialEq<QuoteStyle> for QuoteStyle
impl PartialEq<QuoteStyle> for QuoteStyle
source§fn eq(&self, other: &QuoteStyle) -> bool
fn eq(&self, other: &QuoteStyle) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.