[]Struct swc_ecma_codegen::list::ListFormat

pub struct ListFormat { /* fields omitted */ }

Methods

impl ListFormat

pub const None: ListFormat

pub const fn empty() -> ListFormat

Returns an empty set of flags

pub const fn all() -> ListFormat

Returns the set containing all flags.

pub const fn bits(&self) -> u32

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u32) -> Option<ListFormat>

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: u32) -> ListFormat

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: u32) -> ListFormat

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool

Returns true if all flags are currently set.

pub const fn intersects(&self, other: ListFormat) -> bool

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: ListFormat) -> bool

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: ListFormat)

Inserts the specified flags in-place.

pub fn remove(&mut self, other: ListFormat)

Removes the specified flags in-place.

pub fn toggle(&mut self, other: ListFormat)

Toggles the specified flags in-place.

pub fn set(&mut self, other: ListFormat, value: bool)

Inserts or removes the specified flags depending on the passed value.

impl ListFormat

pub const SingleLine: Self

Prints the list on a single line (default).

pub const MultiLine: Self

Prints the list on multiple lines.

pub const PreserveLines: Self

Prints the list using line preservation if possible.

pub const LinesMask: Self

impl ListFormat

pub const NotDelimited: Self

There is no delimiter between list items (default).

pub const BarDelimited: Self

Each list item is space-and-bar (" |") delimited.

pub const AmpersandDelimited: Self

Each list item is space-and-ampersand (" &") delimited.

pub const CommaDelimited: Self

Each list item is comma (",") delimited.

pub const DelimitersMask: Self

impl ListFormat

pub const AllowTrailingComma: Self

Write a trailing comma (",") if present.

impl ListFormat

pub const Indented: Self

The list should be indented.

pub const SpaceBetweenBraces: Self

Inserts a space after the opening brace and before the closing brace.

pub const SpaceBetweenSiblings: Self

Inserts a space between each sibling node.

impl ListFormat

pub const Braces: Self

The list is surrounded by "{" and "}".

pub const Parenthesis: Self

The list is surrounded by "(" and ")".

pub const AngleBrackets: Self

The list is surrounded by "<" and ">".

pub const SquareBrackets: Self

The list is surrounded by "[" and "]".

pub const BracketsMask: Self

impl ListFormat

pub const OptionalIfUndefined: Self

Do not emit brackets if the list is undefined.

pub const OptionalIfEmpty: Self

Do not emit brackets if the list is empty.

pub const Optional: Self

impl ListFormat

pub const PreferNewLine: Self

Prefer adding a LineTerminator between synthesized nodes.

pub const NoTrailingNewLine: Self

Do not emit a trailing NewLine for a MultiLine list.

pub const NoInterveningComments: Self

Do not emit comments between each node

pub const NoSpaceIfEmpty: Self

If the literal is empty, do not add spaces between braces.

pub const SingleElement: Self

impl ListFormat

pub const Modifiers: Self

pub const HeritageClauses: Self

pub const SingleLineTypeLiteralMembers: Self

pub const MultiLineTypeLiteralMembers: Self

pub const TupleTypeElements: Self

pub const UnionTypeConstituents: Self

pub const IntersectionTypeConstituents: Self

pub const ObjectBindingPatternElements: Self

pub const ArrayBindingPatternElements: Self

pub const ObjectLiteralExpressionProperties: Self

pub const ArrayLiteralExpressionElements: Self

pub const CommaListElements: Self

pub const CallExpressionArguments: Self

pub const NewExpressionArguments: Self

pub const TemplateExpressionSpans: Self

pub const SingleLineBlockStatements: Self

pub const MultiLineBlockStatements: Self

pub const VariableDeclarationList: Self

pub const SingleLineFunctionBodyStatements: Self

pub const MultiLineFunctionBodyStatements: Self

pub const ClassHeritageClauses: Self

pub const ClassMembers: Self

pub const InterfaceMembers: Self

pub const EnumMembers: Self

pub const CaseBlockClauses: Self

pub const NamedImportsOrExportsElements: Self

pub const JsxElementOrFragmentChildren: Self

pub const JsxElementAttributes: Self

pub const CaseOrDefaultClauseStatements: Self

pub const HeritageClauseTypes: Self

pub const SourceFileStatements: Self

pub const Decorators: Self

pub const TypeArguments: Self

pub const TypeParameters: Self

pub const Parameters: Self

pub const IndexSignatureParameters: Self

impl ListFormat[src]

pub fn opening_bracket(self) -> &'static str[src]

pub fn closing_bracket(self) -> &'static str[src]

Trait Implementations

impl Binary for ListFormat

impl BitAnd<ListFormat> for ListFormat

type Output = ListFormat

The resulting type after applying the & operator.

fn bitand(self, other: ListFormat) -> ListFormat

Returns the intersection between the two sets of flags.

impl BitAndAssign<ListFormat> for ListFormat

fn bitand_assign(&mut self, other: ListFormat)

Disables all flags disabled in the set.

impl BitOr<ListFormat> for ListFormat

type Output = ListFormat

The resulting type after applying the | operator.

fn bitor(self, other: ListFormat) -> ListFormat

Returns the union of the two sets of flags.

impl BitOrAssign<ListFormat> for ListFormat

fn bitor_assign(&mut self, other: ListFormat)

Adds the set of flags.

impl BitXor<ListFormat> for ListFormat

type Output = ListFormat

The resulting type after applying the ^ operator.

fn bitxor(self, other: ListFormat) -> ListFormat

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<ListFormat> for ListFormat

fn bitxor_assign(&mut self, other: ListFormat)

Toggles the set of flags.

impl Clone for ListFormat

impl Copy for ListFormat

impl Debug for ListFormat

impl Eq for ListFormat

impl Extend<ListFormat> for ListFormat

impl FromIterator<ListFormat> for ListFormat

impl Hash for ListFormat

impl LowerHex for ListFormat

impl Not for ListFormat

type Output = ListFormat

The resulting type after applying the ! operator.

fn not(self) -> ListFormat

Returns the complement of this set of flags.

impl Octal for ListFormat

impl Ord for ListFormat

impl PartialEq<ListFormat> for ListFormat

impl PartialOrd<ListFormat> for ListFormat

impl StructuralEq for ListFormat

impl StructuralPartialEq for ListFormat

impl Sub<ListFormat> for ListFormat

type Output = ListFormat

The resulting type after applying the - operator.

fn sub(self, other: ListFormat) -> ListFormat

Returns the set difference of the two sets of flags.

impl SubAssign<ListFormat> for ListFormat

fn sub_assign(&mut self, other: ListFormat)

Disables all flags enabled in the set.

impl UpperHex for ListFormat

Auto Trait Implementations

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> Erased for T

impl<T> Erased for T

impl<T, F> Fold<T> for F where
    T: FoldWith<F>, 
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

impl<T, F> Visit<T> for F where
    T: VisitWith<F> + ?Sized
[src]