[−]Struct swc_ecma_codegen::list::ListFormat
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
fn clone(&self) -> ListFormat
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ListFormat
impl Debug for ListFormat
impl Eq for ListFormat
impl Extend<ListFormat> for ListFormat
fn extend<T: IntoIterator<Item = ListFormat>>(&mut self, iterator: T)
impl FromIterator<ListFormat> for ListFormat
fn from_iter<T: IntoIterator<Item = ListFormat>>(iterator: T) -> ListFormat
impl Hash for ListFormat
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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
fn cmp(&self, other: &ListFormat) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<ListFormat> for ListFormat
fn eq(&self, other: &ListFormat) -> bool
fn ne(&self, other: &ListFormat) -> bool
impl PartialOrd<ListFormat> for ListFormat
fn partial_cmp(&self, other: &ListFormat) -> Option<Ordering>
fn lt(&self, other: &ListFormat) -> bool
fn le(&self, other: &ListFormat) -> bool
fn gt(&self, other: &ListFormat) -> bool
fn ge(&self, other: &ListFormat) -> bool
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
impl RefUnwindSafe for ListFormat
impl Send for ListFormat
impl Sync for ListFormat
impl Unpin for ListFormat
impl UnwindSafe for ListFormat
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> Erased for T
impl<T, F> Fold<T> for F where
T: FoldWith<F>,
[src]
T: FoldWith<F>,
default fn fold(&mut self, t: T) -> T
[src]
fn then<F>(self, folder: F) -> AndThen<Self, F> where
F: Fold<T>,
[src]
F: Fold<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, F> Visit<T> for F where
T: VisitWith<F> + ?Sized,
[src]
T: VisitWith<F> + ?Sized,