[]Struct swc_ecma_codegen::list::ListFormat

pub struct ListFormat { /* fields omitted */ }

Methods

impl ListFormat

pub const None: ListFormat

pub fn empty() -> ListFormat

Returns an empty set of flags.

pub fn all() -> ListFormat

Returns the set containing all flags.

pub 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 fn from_bits_truncate(bits: u32) -> ListFormat

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

pub fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

pub fn is_all(&self) -> bool

Returns true if all flags are currently set.

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

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

pub 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 Eq for ListFormat

impl Extend<ListFormat> for ListFormat

impl PartialOrd<ListFormat> for ListFormat

impl Copy for ListFormat

impl PartialEq<ListFormat> for ListFormat

impl Clone for ListFormat

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for ListFormat

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Binary for ListFormat

impl Debug for ListFormat

impl UpperHex for ListFormat

impl LowerHex for ListFormat

impl Octal for ListFormat

impl Hash for ListFormat

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

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 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 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 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 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 BitAndAssign<ListFormat> for ListFormat

fn bitand_assign(&mut self, other: ListFormat)

Disables all flags disabled in the set.

impl BitOrAssign<ListFormat> for ListFormat

fn bitor_assign(&mut self, other: ListFormat)

Adds the set of flags.

impl BitXorAssign<ListFormat> for ListFormat

fn bitxor_assign(&mut self, other: ListFormat)

Toggles the set of flags.

impl FromIterator<ListFormat> for ListFormat

Auto Trait Implementations

impl Send for ListFormat

impl Sync for ListFormat

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Erased for T