Struct swc_core::transforms::feature::FeatureFlag
[−]pub struct FeatureFlag { /* private fields */ }
__transforms
only.Implementations
impl FeatureFlag
impl FeatureFlag
pub const TemplateLiterals: FeatureFlag = Self{ bits: 1 << 0,}
pub const TemplateLiterals: FeatureFlag = Self{ bits: 1 << 0,}
transform-template-literals
pub const Literals: FeatureFlag = Self{ bits: 1 << 1,}
pub const Literals: FeatureFlag = Self{ bits: 1 << 1,}
transform-literals
pub const FunctionName: FeatureFlag = Self{ bits: 1 << 2,}
pub const FunctionName: FeatureFlag = Self{ bits: 1 << 2,}
transform-function-name
pub const ArrowFunctions: FeatureFlag = Self{ bits: 1 << 3,}
pub const ArrowFunctions: FeatureFlag = Self{ bits: 1 << 3,}
transform-arrow-functions
pub const BlockScopedFunctions: FeatureFlag = Self{ bits: 1 << 4,}
pub const BlockScopedFunctions: FeatureFlag = Self{ bits: 1 << 4,}
transform-block-scoped-functions
pub const Classes: FeatureFlag = Self{ bits: 1 << 5,}
pub const Classes: FeatureFlag = Self{ bits: 1 << 5,}
transform-classes
pub const ObjectSuper: FeatureFlag = Self{ bits: 1 << 6,}
pub const ObjectSuper: FeatureFlag = Self{ bits: 1 << 6,}
transform-object-super
pub const ShorthandProperties: FeatureFlag = Self{ bits: 1 << 7,}
pub const ShorthandProperties: FeatureFlag = Self{ bits: 1 << 7,}
transform-shorthand-properties
pub const DuplicateKeys: FeatureFlag = Self{ bits: 1 << 8,}
pub const DuplicateKeys: FeatureFlag = Self{ bits: 1 << 8,}
transform-duplicate-keys
pub const ComputedProperties: FeatureFlag = Self{ bits: 1 << 9,}
pub const ComputedProperties: FeatureFlag = Self{ bits: 1 << 9,}
transform-computed-properties
pub const ForOf: FeatureFlag = Self{ bits: 1 << 10,}
pub const ForOf: FeatureFlag = Self{ bits: 1 << 10,}
transform-for-of
pub const StickyRegex: FeatureFlag = Self{ bits: 1 << 11,}
pub const StickyRegex: FeatureFlag = Self{ bits: 1 << 11,}
transform-sticky-regex
pub const DotAllRegex: FeatureFlag = Self{ bits: 1 << 12,}
pub const DotAllRegex: FeatureFlag = Self{ bits: 1 << 12,}
transform-dotall-regex
pub const UnicodeRegex: FeatureFlag = Self{ bits: 1 << 13,}
pub const UnicodeRegex: FeatureFlag = Self{ bits: 1 << 13,}
transform-unicode-regex
pub const Spread: FeatureFlag = Self{ bits: 1 << 14,}
pub const Spread: FeatureFlag = Self{ bits: 1 << 14,}
transform-spread
pub const Parameters: FeatureFlag = Self{ bits: 1 << 15,}
pub const Parameters: FeatureFlag = Self{ bits: 1 << 15,}
transform-parameters
pub const Destructuring: FeatureFlag = Self{ bits: 1 << 16,}
pub const Destructuring: FeatureFlag = Self{ bits: 1 << 16,}
transform-destructuring
pub const BlockScoping: FeatureFlag = Self{ bits: 1 << 17,}
pub const BlockScoping: FeatureFlag = Self{ bits: 1 << 17,}
transform-block-scoping
pub const TypeOfSymbol: FeatureFlag = Self{ bits: 1 << 18,}
pub const TypeOfSymbol: FeatureFlag = Self{ bits: 1 << 18,}
transform-typeof-symbol
pub const NewTarget: FeatureFlag = Self{ bits: 1 << 19,}
pub const NewTarget: FeatureFlag = Self{ bits: 1 << 19,}
transform-new-target
pub const Regenerator: FeatureFlag = Self{ bits: 1 << 20,}
pub const Regenerator: FeatureFlag = Self{ bits: 1 << 20,}
transform-regenerator
pub const ExponentiationOperator: FeatureFlag = Self{ bits: 1 << 21,}
pub const ExponentiationOperator: FeatureFlag = Self{ bits: 1 << 21,}
transform-exponentiation-operator
pub const AsyncToGenerator: FeatureFlag = Self{ bits: 1 << 22,}
pub const AsyncToGenerator: FeatureFlag = Self{ bits: 1 << 22,}
transform-async-to-generator
pub const AsyncGeneratorFunctions: FeatureFlag = Self{ bits: 1 << 23,}
pub const AsyncGeneratorFunctions: FeatureFlag = Self{ bits: 1 << 23,}
proposal-async-generator-functions
pub const ObjectRestSpread: FeatureFlag = Self{ bits: 1 << 24,}
pub const ObjectRestSpread: FeatureFlag = Self{ bits: 1 << 24,}
proposal-object-rest-spread
pub const UnicodePropertyRegex: FeatureFlag = Self{ bits: 1 << 25,}
pub const UnicodePropertyRegex: FeatureFlag = Self{ bits: 1 << 25,}
proposal-unicode-property-regex
pub const JsonStrings: FeatureFlag = Self{ bits: 1 << 26,}
pub const JsonStrings: FeatureFlag = Self{ bits: 1 << 26,}
proposal-json-strings
pub const OptionalCatchBinding: FeatureFlag = Self{ bits: 1 << 27,}
pub const OptionalCatchBinding: FeatureFlag = Self{ bits: 1 << 27,}
proposal-optional-catch-binding
pub const NamedCapturingGroupsRegex: FeatureFlag = Self{ bits: 1 << 28,}
pub const NamedCapturingGroupsRegex: FeatureFlag = Self{ bits: 1 << 28,}
transform-named-capturing-groups-regex
pub const MemberExpressionLiterals: FeatureFlag = Self{ bits: 1 << 29,}
pub const MemberExpressionLiterals: FeatureFlag = Self{ bits: 1 << 29,}
transform-member-expression-literals
pub const PropertyLiterals: FeatureFlag = Self{ bits: 1 << 30,}
pub const PropertyLiterals: FeatureFlag = Self{ bits: 1 << 30,}
transform-property-literals
pub const ReservedWords: FeatureFlag = Self{ bits: 1 << 31,}
pub const ReservedWords: FeatureFlag = Self{ bits: 1 << 31,}
transform-reserved-words
pub const ExportNamespaceFrom: FeatureFlag = Self{ bits: 1 << 32,}
pub const ExportNamespaceFrom: FeatureFlag = Self{ bits: 1 << 32,}
proposal-export-namespace-from
pub const NullishCoalescing: FeatureFlag = Self{ bits: 1 << 33,}
pub const NullishCoalescing: FeatureFlag = Self{ bits: 1 << 33,}
proposal-nullish-coalescing-operator
pub const LogicalAssignmentOperators: FeatureFlag = Self{ bits: 1 << 34,}
pub const LogicalAssignmentOperators: FeatureFlag = Self{ bits: 1 << 34,}
proposal-logical-assignment-operators
pub const OptionalChaining: FeatureFlag = Self{ bits: 1 << 35,}
pub const OptionalChaining: FeatureFlag = Self{ bits: 1 << 35,}
proposal-optional-chaining
pub const ClassProperties: FeatureFlag = Self{ bits: 1 << 36,}
pub const ClassProperties: FeatureFlag = Self{ bits: 1 << 36,}
proposal-class-properties
pub const NumericSeparator: FeatureFlag = Self{ bits: 1 << 37,}
pub const NumericSeparator: FeatureFlag = Self{ bits: 1 << 37,}
proposal-numeric-separator
pub const PrivateMethods: FeatureFlag = Self{ bits: 1 << 38,}
pub const PrivateMethods: FeatureFlag = Self{ bits: 1 << 38,}
proposal-private-methods
pub const ClassStaticBlock: FeatureFlag = Self{ bits: 1 << 39,}
pub const ClassStaticBlock: FeatureFlag = Self{ bits: 1 << 39,}
proposal-class-static-block
pub const PrivatePropertyInObject: FeatureFlag = Self{ bits: 1 << 40,}
pub const PrivatePropertyInObject: FeatureFlag = Self{ bits: 1 << 40,}
proposal-private-property-in-object
pub const UnicodeEscapes: FeatureFlag = Self{ bits: 1 << 41,}
pub const UnicodeEscapes: FeatureFlag = Self{ bits: 1 << 41,}
transform-unicode-escapes
pub const BugfixAsyncArrowsInClass: FeatureFlag = Self{ bits: 1 << 42,}
pub const BugfixAsyncArrowsInClass: FeatureFlag = Self{ bits: 1 << 42,}
bugfix/transform-async-arrows-in-class
pub const BugfixEdgeDefaultParam: FeatureFlag = Self{ bits: 1 << 43,}
pub const BugfixEdgeDefaultParam: FeatureFlag = Self{ bits: 1 << 43,}
bugfix/transform-edge-default-parameters
pub const BugfixTaggedTemplateCaching: FeatureFlag = Self{ bits: 1 << 44,}
pub const BugfixTaggedTemplateCaching: FeatureFlag = Self{ bits: 1 << 44,}
bugfix/transform-tagged-template-caching
pub const BugfixSafariIdDestructuringCollisionInFunctionExpression: FeatureFlag = Self{ bits: 1 << 45,}
pub const BugfixSafariIdDestructuringCollisionInFunctionExpression: FeatureFlag = Self{ bits: 1 << 45,}
bugfix/transform-safari-id-destructuring-collision-in-function-expression
pub const BugfixTransformEdgeFunctionName: FeatureFlag = Self{ bits: 1 << 46,}
pub const BugfixTransformEdgeFunctionName: FeatureFlag = Self{ bits: 1 << 46,}
bugfix/transform-edge-function-name
pub const BugfixTransformSafariBlockShadowing: FeatureFlag = Self{ bits: 1 << 47,}
pub const BugfixTransformSafariBlockShadowing: FeatureFlag = Self{ bits: 1 << 47,}
bugfix/transform-safari-block-shadowing
pub const BugfixTransformSafariForShadowing: FeatureFlag = Self{ bits: 1 << 48,}
pub const BugfixTransformSafariForShadowing: FeatureFlag = Self{ bits: 1 << 48,}
bugfix/transform-safari-for-shadowing
pub const BugfixTransformV8SpreadParametersInOptionalChaining: FeatureFlag = Self{ bits: 1 << 49,}
pub const BugfixTransformV8SpreadParametersInOptionalChaining: FeatureFlag = Self{ bits: 1 << 49,}
bugfix/transform-v8-spread-parameters-in-optional-chaining
pub const fn empty() -> FeatureFlag
pub const fn empty() -> FeatureFlag
Returns an empty set of flags.
pub const fn all() -> FeatureFlag
pub const fn all() -> FeatureFlag
Returns the set containing all flags.
pub const fn from_bits(bits: u64) -> Option<FeatureFlag>
pub const fn from_bits(bits: u64) -> Option<FeatureFlag>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u64) -> FeatureFlag
pub const fn from_bits_truncate(bits: u64) -> FeatureFlag
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u64) -> FeatureFlag
pub const unsafe fn from_bits_unchecked(bits: u64) -> FeatureFlag
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
pub const fn intersects(&self, other: FeatureFlag) -> bool
pub const fn intersects(&self, other: FeatureFlag) -> bool
Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: FeatureFlag) -> bool
pub const fn contains(&self, other: FeatureFlag) -> bool
Returns true
if all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: FeatureFlag)
pub fn insert(&mut self, other: FeatureFlag)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: FeatureFlag)
pub fn remove(&mut self, other: FeatureFlag)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: FeatureFlag)
pub fn toggle(&mut self, other: FeatureFlag)
Toggles the specified flags in-place.
pub fn set(&mut self, other: FeatureFlag, value: bool)
pub fn set(&mut self, other: FeatureFlag, value: bool)
Inserts or removes the specified flags depending on the passed value.
pub const fn intersection(self, other: FeatureFlag) -> FeatureFlag
pub const fn intersection(self, other: FeatureFlag) -> FeatureFlag
Returns the intersection between the flags in self
and
other
.
Specifically, the returned set contains only the flags which are
present in both self
and other
.
This is equivalent to using the &
operator (e.g.
ops::BitAnd
), as in flags & other
.
pub const fn union(self, other: FeatureFlag) -> FeatureFlag
pub const fn union(self, other: FeatureFlag) -> FeatureFlag
Returns the union of between the flags in self
and other
.
Specifically, the returned set contains all flags which are
present in either self
or other
, including any which are
present in both (see Self::symmetric_difference
if that
is undesirable).
This is equivalent to using the |
operator (e.g.
ops::BitOr
), as in flags | other
.
pub const fn difference(self, other: FeatureFlag) -> FeatureFlag
pub const fn difference(self, other: FeatureFlag) -> FeatureFlag
Returns the difference between the flags in self
and other
.
Specifically, the returned set contains all flags present in
self
, except for the ones present in other
.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other
(and this syntax is also supported).
This is equivalent to using the -
operator (e.g.
ops::Sub
), as in flags - other
.
pub const fn symmetric_difference(self, other: FeatureFlag) -> FeatureFlag
pub const fn symmetric_difference(self, other: FeatureFlag) -> FeatureFlag
Returns the symmetric difference between the flags
in self
and other
.
Specifically, the returned set contains the flags present which
are present in self
or other
, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self
and other
.
This is equivalent to using the ^
operator (e.g.
ops::BitXor
), as in flags ^ other
.
pub const fn complement(self) -> FeatureFlag
pub const fn complement(self) -> FeatureFlag
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self
, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all()
and self
(e.g. Self::all() - self
)
This is equivalent to using the !
operator (e.g.
ops::Not
), as in !flags
.
Trait Implementations
impl Binary for FeatureFlag
impl Binary for FeatureFlag
impl BitAnd<FeatureFlag> for FeatureFlag
impl BitAnd<FeatureFlag> for FeatureFlag
fn bitand(self, other: FeatureFlag) -> FeatureFlag
fn bitand(self, other: FeatureFlag) -> FeatureFlag
Returns the intersection between the two sets of flags.
type Output = FeatureFlag
type Output = FeatureFlag
The resulting type after applying the &
operator.
impl BitAndAssign<FeatureFlag> for FeatureFlag
impl BitAndAssign<FeatureFlag> for FeatureFlag
fn bitand_assign(&mut self, other: FeatureFlag)
fn bitand_assign(&mut self, other: FeatureFlag)
Disables all flags disabled in the set.
impl BitOr<FeatureFlag> for FeatureFlag
impl BitOr<FeatureFlag> for FeatureFlag
fn bitor(self, other: FeatureFlag) -> FeatureFlag
fn bitor(self, other: FeatureFlag) -> FeatureFlag
Returns the union of the two sets of flags.
type Output = FeatureFlag
type Output = FeatureFlag
The resulting type after applying the |
operator.
impl BitOrAssign<FeatureFlag> for FeatureFlag
impl BitOrAssign<FeatureFlag> for FeatureFlag
fn bitor_assign(&mut self, other: FeatureFlag)
fn bitor_assign(&mut self, other: FeatureFlag)
Adds the set of flags.
impl BitXor<FeatureFlag> for FeatureFlag
impl BitXor<FeatureFlag> for FeatureFlag
fn bitxor(self, other: FeatureFlag) -> FeatureFlag
fn bitxor(self, other: FeatureFlag) -> FeatureFlag
Returns the left flags, but with all the right flags toggled.
type Output = FeatureFlag
type Output = FeatureFlag
The resulting type after applying the ^
operator.
impl BitXorAssign<FeatureFlag> for FeatureFlag
impl BitXorAssign<FeatureFlag> for FeatureFlag
fn bitxor_assign(&mut self, other: FeatureFlag)
fn bitxor_assign(&mut self, other: FeatureFlag)
Toggles the set of flags.
impl Clone for FeatureFlag
impl Clone for FeatureFlag
fn clone(&self) -> FeatureFlag
fn clone(&self) -> FeatureFlag
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for FeatureFlag
impl Debug for FeatureFlag
impl Default for FeatureFlag
impl Default for FeatureFlag
fn default() -> FeatureFlag
fn default() -> FeatureFlag
Returns the “default value” for a type. Read more
impl Extend<FeatureFlag> for FeatureFlag
impl Extend<FeatureFlag> for FeatureFlag
fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = FeatureFlag>,
fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = FeatureFlag>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl FromIterator<FeatureFlag> for FeatureFlag
impl FromIterator<FeatureFlag> for FeatureFlag
fn from_iter<T>(iterator: T) -> FeatureFlag where
T: IntoIterator<Item = FeatureFlag>,
fn from_iter<T>(iterator: T) -> FeatureFlag where
T: IntoIterator<Item = FeatureFlag>,
Creates a value from an iterator. Read more
impl Hash for FeatureFlag
impl Hash for FeatureFlag
impl LowerHex for FeatureFlag
impl LowerHex for FeatureFlag
impl Not for FeatureFlag
impl Not for FeatureFlag
fn not(self) -> FeatureFlag
fn not(self) -> FeatureFlag
Returns the complement of this set of flags.
type Output = FeatureFlag
type Output = FeatureFlag
The resulting type after applying the !
operator.
impl Octal for FeatureFlag
impl Octal for FeatureFlag
impl Ord for FeatureFlag
impl Ord for FeatureFlag
fn cmp(&self, other: &FeatureFlag) -> Ordering
fn cmp(&self, other: &FeatureFlag) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
impl PartialEq<FeatureFlag> for FeatureFlag
impl PartialEq<FeatureFlag> for FeatureFlag
fn eq(&self, other: &FeatureFlag) -> bool
fn eq(&self, other: &FeatureFlag) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl PartialOrd<FeatureFlag> for FeatureFlag
impl PartialOrd<FeatureFlag> for FeatureFlag
fn partial_cmp(&self, other: &FeatureFlag) -> Option<Ordering>
fn partial_cmp(&self, other: &FeatureFlag) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Sub<FeatureFlag> for FeatureFlag
impl Sub<FeatureFlag> for FeatureFlag
fn sub(self, other: FeatureFlag) -> FeatureFlag
fn sub(self, other: FeatureFlag) -> FeatureFlag
Returns the set difference of the two sets of flags.
type Output = FeatureFlag
type Output = FeatureFlag
The resulting type after applying the -
operator.
impl SubAssign<FeatureFlag> for FeatureFlag
impl SubAssign<FeatureFlag> for FeatureFlag
fn sub_assign(&mut self, other: FeatureFlag)
fn sub_assign(&mut self, other: FeatureFlag)
Disables all flags enabled in the set.
impl UpperHex for FeatureFlag
impl UpperHex for FeatureFlag
impl Copy for FeatureFlag
impl Eq for FeatureFlag
impl StructuralEq for FeatureFlag
impl StructuralPartialEq for FeatureFlag
Auto Trait Implementations
impl RefUnwindSafe for FeatureFlag
impl Send for FeatureFlag
impl Sync for FeatureFlag
impl Unpin for FeatureFlag
impl UnwindSafe for FeatureFlag
Blanket Implementations
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ImplicitClone for T where
T: Clone,
impl<T> ImplicitClone for T where
T: Clone,
sourcefn clone_quote_var(&self) -> Self
fn clone_quote_var(&self) -> Self
quote
only.sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<D> OwoColorize for D
impl<D> OwoColorize for D
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self> where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self> where
C: Color,
Set the foreground color generically Read more
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self> where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self> where
C: Color,
Set the background color generically. Read more
fn black(&'a self) -> FgColorDisplay<'a, Black, Self>
fn black(&'a self) -> FgColorDisplay<'a, Black, Self>
Change the foreground color to black
fn on_black(&'a self) -> BgColorDisplay<'a, Black, Self>
fn on_black(&'a self) -> BgColorDisplay<'a, Black, Self>
Change the background color to black
fn red(&'a self) -> FgColorDisplay<'a, Red, Self>
fn red(&'a self) -> FgColorDisplay<'a, Red, Self>
Change the foreground color to red
fn on_red(&'a self) -> BgColorDisplay<'a, Red, Self>
fn on_red(&'a self) -> BgColorDisplay<'a, Red, Self>
Change the background color to red
fn green(&'a self) -> FgColorDisplay<'a, Green, Self>
fn green(&'a self) -> FgColorDisplay<'a, Green, Self>
Change the foreground color to green
fn on_green(&'a self) -> BgColorDisplay<'a, Green, Self>
fn on_green(&'a self) -> BgColorDisplay<'a, Green, Self>
Change the background color to green
fn yellow(&'a self) -> FgColorDisplay<'a, Yellow, Self>
fn yellow(&'a self) -> FgColorDisplay<'a, Yellow, Self>
Change the foreground color to yellow
fn on_yellow(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow(&'a self) -> BgColorDisplay<'a, Yellow, Self>
Change the background color to yellow
fn blue(&'a self) -> FgColorDisplay<'a, Blue, Self>
fn blue(&'a self) -> FgColorDisplay<'a, Blue, Self>
Change the foreground color to blue
fn on_blue(&'a self) -> BgColorDisplay<'a, Blue, Self>
fn on_blue(&'a self) -> BgColorDisplay<'a, Blue, Self>
Change the background color to blue
fn magenta(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Change the foreground color to magenta
fn on_magenta(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Change the background color to magenta
fn purple(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn purple(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Change the foreground color to purple
fn on_purple(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Change the background color to purple
fn cyan(&'a self) -> FgColorDisplay<'a, Cyan, Self>
fn cyan(&'a self) -> FgColorDisplay<'a, Cyan, Self>
Change the foreground color to cyan
fn on_cyan(&'a self) -> BgColorDisplay<'a, Cyan, Self>
fn on_cyan(&'a self) -> BgColorDisplay<'a, Cyan, Self>
Change the background color to cyan
fn white(&'a self) -> FgColorDisplay<'a, White, Self>
fn white(&'a self) -> FgColorDisplay<'a, White, Self>
Change the foreground color to white
fn on_white(&'a self) -> BgColorDisplay<'a, White, Self>
fn on_white(&'a self) -> BgColorDisplay<'a, White, Self>
Change the background color to white
fn default_color(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color(&'a self) -> FgColorDisplay<'a, Default, Self>
Change the foreground color to the terminal default
fn on_default_color(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color(&'a self) -> BgColorDisplay<'a, Default, Self>
Change the background color to the terminal default
fn bright_black(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
Change the foreground color to bright black
fn on_bright_black(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
Change the background color to bright black
fn bright_red(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
Change the foreground color to bright red
fn on_bright_red(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
Change the background color to bright red
fn bright_green(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
Change the foreground color to bright green
fn on_bright_green(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
Change the background color to bright green
fn bright_yellow(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
Change the foreground color to bright yellow
fn on_bright_yellow(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
Change the background color to bright yellow
fn bright_blue(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
Change the foreground color to bright blue
fn on_bright_blue(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
Change the background color to bright blue
fn bright_magenta(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright magenta
fn on_bright_magenta(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Change the background color to bright magenta
fn bright_purple(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright purple
fn on_bright_purple(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Change the background color to bright purple
fn bright_cyan(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
Change the foreground color to bright cyan
fn on_bright_cyan(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
Change the background color to bright cyan
fn bright_white(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
Change the foreground color to bright white
fn on_bright_white(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
Change the background color to bright white
fn bold(&'a self) -> BoldDisplay<'a, Self>
fn bold(&'a self) -> BoldDisplay<'a, Self>
Make the text bold
fn dimmed(&'a self) -> DimDisplay<'a, Self>
fn dimmed(&'a self) -> DimDisplay<'a, Self>
Make the text dim
fn italic(&'a self) -> ItalicDisplay<'a, Self>
fn italic(&'a self) -> ItalicDisplay<'a, Self>
Make the text italicized
fn underline(&'a self) -> UnderlineDisplay<'a, Self>
fn underline(&'a self) -> UnderlineDisplay<'a, Self>
Make the text italicized
fn blink(&'a self) -> BlinkDisplay<'a, Self>
fn blink(&'a self) -> BlinkDisplay<'a, Self>
Make the text blink
fn blink_fast(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast(&'a self) -> BlinkFastDisplay<'a, Self>
Make the text blink (but fast!)
fn reversed(&'a self) -> ReversedDisplay<'a, Self>
fn reversed(&'a self) -> ReversedDisplay<'a, Self>
Swap the foreground and background colors
Hide the text
fn strikethrough(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough(&'a self) -> StrikeThroughDisplay<'a, Self>
Cross out the text
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
Set the foreground color at runtime. Only use if you do not know which color will be used at
compile-time. If the color is constant, use either OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
Set the background color at runtime. Only use if you do not know what color to use at
compile-time. If the color is constant, use either OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more
fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the foreground color to a specific RGB value.
fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the background color to a specific RGB value.
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Sets the foreground color to an RGB value.
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Sets the background color to an RGB value.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more