Enum dprint_swc_ecma_ast_view::StrKind [−]
pub enum StrKind {
Normal {
contains_quote: bool,
},
Synthesized,
}
Expand description
THis enum determines how string literal should be printed.
Variants
Span of string points to original source code, and codegen should use it. Note: Giving wrong value to this field will result in invalid codegen.
Fields of Normal
contains_quote: bool
Does span of this string literal contains quote?
True for string literals generated by parser, false for string literals generated by various passes.
If the span of string does not point a string literal, mainly because this string is synthesized, this variant should be used.
Trait Implementations
impl<'de> Deserialize<'de> for StrKind
impl<'de> Deserialize<'de> for StrKind
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<StrKind, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<StrKind, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl EqIgnoreSpan for StrKind
impl EqIgnoreSpan for StrKind
Always returns true as this is not a data of a string literal.
pub fn eq_ignore_span(&self, &StrKind) -> bool
impl<V> FoldWith<V> for StrKind where
V: Fold,
impl<V> FoldWith<V> for StrKind where
V: Fold,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<V> VisitAllWith<V> for StrKind where
V: VisitAll,
impl<V> VisitAllWith<V> for StrKind where
V: VisitAll,
pub fn visit_all_with(&self, _parent: &(dyn Node + 'static), v: &mut V)
pub fn visit_all_children_with(&self, _visitor: &mut V)
pub fn visit_all_children_with(&self, _visitor: &mut V)
Visit children nodes of self with v
impl<V> VisitMutWith<V> for StrKind where
V: VisitMut,
impl<V> VisitMutWith<V> for StrKind where
V: VisitMut,
pub fn visit_mut_with(&mut self, v: &mut V)
pub fn visit_mut_children_with(&mut self, _visitor: &mut V)
impl<V> VisitWith<V> for StrKind where
V: Visit,
impl<V> VisitWith<V> for StrKind where
V: Visit,
pub fn visit_with(&self, _parent: &(dyn Node + 'static), v: &mut V)
pub fn visit_children_with(&self, _visitor: &mut V)
pub fn visit_children_with(&self, _visitor: &mut V)
Visit children nodes of self with v
impl StructuralEq for StrKind
impl StructuralPartialEq for StrKind
Auto Trait Implementations
impl RefUnwindSafe for StrKind
impl UnwindSafe for StrKind
Blanket Implementations
Mutably borrows from an owned value. Read more