Enum swc_ecma_ast::StrKind[][src]

pub enum StrKind {
    Normal {
        contains_quote: bool,
    },
    Synthesized,
}

THis enum determines how string literal should be printed.

Variants

Normal

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.

Synthesized

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 Clone for StrKind[src]

impl Copy for StrKind[src]

impl Debug for StrKind[src]

impl Default for StrKind[src]

impl<'de> Deserialize<'de> for StrKind[src]

impl Eq for StrKind[src]

impl EqIgnoreSpan for StrKind[src]

Always returns true as this is not a data of a string literal.

impl Hash for StrKind[src]

impl PartialEq<StrKind> for StrKind[src]

impl Serialize for StrKind[src]

impl StructuralEq for StrKind[src]

impl StructuralPartialEq for StrKind[src]

Auto Trait Implementations

impl RefUnwindSafe for StrKind

impl Send for StrKind

impl Sync for StrKind

impl Unpin for StrKind

impl UnwindSafe for StrKind

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.