#[non_exhaustive]#[repr(u16)]pub enum IssueCode {
Show 293 variants
AbstractClassUsedAsAttribute = 0,
AbstractInstantiation = 1,
AlwaysMatchingSwitchCase = 2,
AmbiguousClassLikeConstantAccess = 3,
AmbiguousInstantiationTarget = 4,
AmbiguousObjectMethodAccess = 5,
AmbiguousObjectPropertyAccess = 6,
ArrayAppendInReadContext = 7,
ArrayToStringConversion = 8,
AssignmentToConstant = 9,
AssignmentToThis = 10,
AttributeNotRepeatable = 11,
AvoidCatchingError = 12,
BackedPropertyReferenceHook = 13,
CatchTypeNotThrowable = 14,
ClassNotMarkedAsAttribute = 15,
CloneInsideLoop = 16,
ConditionIsTooComplex = 17,
ConflictingReferenceConstraint = 18,
ConflictingTemplateEqualityBounds = 19,
DeprecatedClass = 20,
DeprecatedClosure = 21,
DeprecatedConstant = 22,
DeprecatedFeature = 23,
DeprecatedFunction = 24,
DeprecatedMethod = 25,
DeprecatedTrait = 26,
DirectTraitConstantAccess = 27,
DocblockTypeMismatch = 28,
DuplicateArrayKey = 29,
DuplicateCaughtType = 30,
DuplicateClosureUseVariable = 31,
DuplicateDefinition = 32,
DuplicateNamedArgument = 33,
DynamicStaticMethodCall = 34,
EmptyMatchExpression = 35,
EnumInstantiation = 36,
EnumIteration = 37,
ExcessTemplateParameter = 38,
ExpressionIsTooComplex = 39,
ExtendFinalClass = 40,
FalsableReturnStatement = 41,
FalseArgument = 42,
FalseIterator = 43,
FalseOperand = 44,
GenericObjectIteration = 45,
HiddenGeneratorReturn = 46,
ImplicitResourceToStringCast = 47,
ImplicitToStringCast = 48,
ImpossibleArrayAccess = 49,
ImpossibleArrayAssignment = 50,
ImpossibleAssignment = 51,
ImpossibleCondition = 52,
ImpossibleKeyCheck = 53,
ImpossibleNonnullEntryCheck = 54,
ImpossibleNullTypeComparison = 55,
ImpossibleTypeComparison = 56,
ImpureConstruct = 57,
ImpureStaticVariable = 58,
IncompatibleConstantAccess = 59,
IncompatibleConstantOverride = 60,
IncompatibleConstantType = 61,
IncompatibleConstantVisibility = 62,
IncompatibleParameterCount = 63,
IncompatibleParameterName = 64,
IncompatibleParameterType = 65,
IncompatiblePropertyAccess = 66,
IncompatiblePropertyDefault = 67,
IncompatiblePropertyHookParameterType = 68,
IncompatiblePropertyHookSignature = 69,
IncompatiblePropertyOverride = 70,
IncompatiblePropertyReadonly = 71,
IncompatiblePropertyStatic = 72,
IncompatiblePropertyType = 73,
IncompatiblePropertyVisibility = 74,
IncompatibleReadonlyModifier = 75,
IncompatibleReturnType = 76,
IncompatibleStaticModifier = 77,
IncompatibleTemplateLowerBound = 78,
IncompatibleVisibility = 79,
InconsistentTemplate = 80,
InterfaceInstantiation = 81,
InvalidArgument = 82,
InvalidArrayAccess = 83,
InvalidArrayAccessAssignmentValue = 84,
InvalidArrayElement = 85,
InvalidArrayElementKey = 86,
InvalidArrayIndex = 87,
InvalidAssignment = 88,
InvalidAttributeTarget = 89,
InvalidBreak = 90,
InvalidCallable = 91,
InvalidCatchType = 92,
InvalidCatchTypeNotClassOrInterface = 93,
InvalidClassConstantOnString = 94,
InvalidClassStringExpression = 95,
InvalidClone = 96,
InvalidConstantSelector = 97,
InvalidContinue = 98,
InvalidDestructuringSource = 99,
InvalidDocblock = 100,
InvalidEnumCaseValue = 101,
InvalidExtend = 102,
InvalidForeachKey = 103,
InvalidForeachValue = 104,
InvalidGeneratorReturnType = 105,
InvalidGlobal = 106,
InvalidImplement = 107,
InvalidIssetExpression = 108,
InvalidIterator = 109,
InvalidMemberSelector = 110,
InvalidMethodAccess = 111,
InvalidNamedArgument = 112,
InvalidOperand = 113,
InvalidOverrideAttribute = 114,
InvalidParentType = 115,
InvalidPassByReference = 116,
InvalidPropertyAccess = 117,
InvalidPropertyAssignmentValue = 118,
InvalidPropertyRead = 119,
InvalidPropertyWrite = 120,
InvalidReturnStatement = 121,
InvalidScopeKeywordContext = 122,
InvalidStaticMethodAccess = 123,
InvalidStaticMethodCall = 124,
InvalidStaticPropertyAccess = 125,
InvalidTemplateParameter = 126,
InvalidThrow = 127,
InvalidTraitAliasModifier = 128,
InvalidTraitUse = 129,
InvalidTypeCast = 130,
InvalidUnset = 131,
InvalidYieldKeyType = 132,
InvalidYieldValueType = 133,
LessSpecificArgument = 134,
LessSpecificNestedArgumentType = 135,
LessSpecificNestedReturnStatement = 136,
LessSpecificReturnStatement = 137,
ListUsedInReadContext = 138,
MatchArmAlwaysTrue = 139,
MatchDefaultArmAlwaysExecuted = 140,
MatchExpressionOnlyDefaultArm = 141,
MatchNotExhaustive = 142,
MatchSubjectTypeIsNever = 143,
MethodAccessOnNull = 144,
MismatchedArrayIndex = 145,
MissingConstantType = 146,
MissingConstructor = 147,
MissingMagicMethod = 148,
MissingOverrideAttribute = 149,
MissingParameterType = 150,
MissingPropertyType = 151,
MissingRequiredInterface = 152,
MissingRequiredParent = 153,
MissingReturnStatement = 154,
MissingReturnType = 155,
MissingTemplateParameter = 156,
MixedArgument = 157,
MixedArrayAccess = 158,
MixedArrayAssignment = 159,
MixedArrayIndex = 160,
MixedAssignment = 161,
MixedClone = 162,
MixedDestructuringShape = 163,
MixedMethodAccess = 164,
MixedOperand = 165,
MixedPropertyAccess = 166,
MixedPropertyTypeCoercion = 167,
MixedReturnStatement = 168,
NameAlreadyInUse = 169,
NamedArgumentAfterPositional = 170,
NamedArgumentNotAllowed = 171,
NamedArgumentOverridesPositional = 172,
NeverMatchingSwitchCase = 173,
NeverReturn = 174,
NoValidCatchTypeFound = 175,
NoValue = 176,
NonClassUsedAsAttribute = 177,
NonDocumentedConstant = 178,
NonDocumentedMethod = 179,
NonDocumentedProperty = 180,
NonExistentAttributeClass = 181,
NonExistentCatchType = 182,
NonExistentClass = 183,
NonExistentClassConstant = 184,
NonExistentClassLike = 185,
NonExistentConstant = 186,
NonExistentFunction = 187,
NonExistentMethod = 188,
NonExistentProperty = 189,
NonExistentUseImport = 190,
NonIterableObjectIteration = 191,
NonStaticAbstractImplementation = 192,
NullArgument = 193,
NullArrayAccess = 194,
NullArrayIndex = 195,
NullIterator = 196,
NullOperand = 197,
NullPropertyAccess = 198,
NullableReturnStatement = 199,
OverrideFinalConstant = 200,
OverrideFinalMethod = 201,
OverrideFinalProperty = 202,
OverrideFinalPropertyHook = 203,
ParadoxicalCondition = 204,
ParentOutsideClassScope = 205,
PossibleMethodAccessOnNull = 206,
PossiblyFalseArgument = 207,
PossiblyFalseIterator = 208,
PossiblyFalseOperand = 209,
PossiblyInvalidArgument = 210,
PossiblyInvalidClone = 211,
PossiblyInvalidIterator = 212,
PossiblyInvalidOperand = 213,
PossiblyNonExistentMethod = 214,
PossiblyNonExistentProperty = 215,
PossiblyNullArgument = 216,
PossiblyNullArrayAccess = 217,
PossiblyNullArrayIndex = 218,
PossiblyNullIterator = 219,
PossiblyNullOperand = 220,
PossiblyNullPropertyAccess = 221,
PossiblyStaticAccessOnInterface = 222,
PossiblyUndefinedArrayIndex = 223,
PossiblyUndefinedIntArrayIndex = 224,
PossiblyUndefinedStringArrayIndex = 225,
PossiblyUndefinedVariable = 226,
PropertyTypeCoercion = 227,
PsalmTrace = 228,
RedundantCast = 229,
RedundantComparison = 230,
RedundantCondition = 231,
RedundantDocblockType = 232,
RedundantIssetCheck = 233,
RedundantKeyCheck = 234,
RedundantLogicalOperation = 235,
RedundantNonnullEntryCheck = 236,
RedundantNonnullTypeComparison = 237,
RedundantNullCoalesce = 238,
RedundantNullsafeOperator = 239,
RedundantTypeComparison = 240,
ReferenceConstraintViolation = 241,
ReferenceReusedFromConfusingScope = 242,
ReferenceToUndefinedVariable = 243,
SelfOutsideClassScope = 244,
SkipInKeyedDestructuring = 245,
SpreadInDestructuring = 246,
StaticAccessOnInterface = 247,
StaticOutsideClassScope = 248,
StringConstantSelector = 249,
StringMemberSelector = 250,
TemplateConstraintViolation = 251,
TooFewArguments = 252,
TooManyArguments = 253,
TraitConstantOverride = 254,
TraitInstantiation = 255,
TypeConfirmation = 256,
TypeInspection = 257,
UndefinedIntArrayIndex = 258,
UndefinedStringArrayIndex = 259,
UndefinedVariable = 260,
UndefinedVariableInClosureUse = 261,
UnevaluatedCode = 262,
UnhandledThrownType = 263,
UnimplementedAbstractMethod = 264,
UnimplementedAbstractPropertyHook = 265,
UninitializedProperty = 266,
UnknownClassInstantiation = 267,
UnknownConstantSelectorType = 268,
UnknownIteratorType = 269,
UnknownMatchSubjectType = 270,
UnknownMemberSelectorType = 271,
UnknownYieldFromIteratorType = 272,
UnreachableMatchArm = 273,
UnreachableMatchDefaultArm = 274,
UnreachableSwitchCase = 275,
UnreachableSwitchDefault = 276,
UnsafeInstantiation = 277,
UnusedFunctionCall = 278,
UnusedMethod = 279,
UnusedMethodCall = 280,
UnusedParameter = 281,
UnusedProperty = 282,
UnusedStatement = 283,
UnusedTemplateParameter = 284,
UselessControlFlow = 285,
WhereConstraintViolation = 286,
WriteOnlyProperty = 287,
YieldFromInvalidKeyType = 288,
YieldFromInvalidSendType = 289,
YieldFromInvalidValueType = 290,
YieldFromNonIterable = 291,
YieldOutsideFunction = 292,
}Expand description
An issue code representing a specific type of analysis issue.
Each issue code corresponds to a unique identifier for a particular kind of issue that the analyzer can detect during code analysis.
This enum is non-exhaustive; new issue codes may be added in future versions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AbstractClassUsedAsAttribute = 0
AbstractInstantiation = 1
AlwaysMatchingSwitchCase = 2
AmbiguousClassLikeConstantAccess = 3
AmbiguousInstantiationTarget = 4
AmbiguousObjectMethodAccess = 5
AmbiguousObjectPropertyAccess = 6
ArrayAppendInReadContext = 7
ArrayToStringConversion = 8
AssignmentToConstant = 9
AssignmentToThis = 10
AttributeNotRepeatable = 11
AvoidCatchingError = 12
BackedPropertyReferenceHook = 13
CatchTypeNotThrowable = 14
ClassNotMarkedAsAttribute = 15
CloneInsideLoop = 16
ConditionIsTooComplex = 17
ConflictingReferenceConstraint = 18
ConflictingTemplateEqualityBounds = 19
DeprecatedClass = 20
DeprecatedClosure = 21
DeprecatedConstant = 22
DeprecatedFeature = 23
DeprecatedFunction = 24
DeprecatedMethod = 25
DeprecatedTrait = 26
DirectTraitConstantAccess = 27
DocblockTypeMismatch = 28
DuplicateArrayKey = 29
DuplicateCaughtType = 30
DuplicateClosureUseVariable = 31
DuplicateDefinition = 32
DuplicateNamedArgument = 33
DynamicStaticMethodCall = 34
EmptyMatchExpression = 35
EnumInstantiation = 36
EnumIteration = 37
ExcessTemplateParameter = 38
ExpressionIsTooComplex = 39
ExtendFinalClass = 40
FalsableReturnStatement = 41
FalseArgument = 42
FalseIterator = 43
FalseOperand = 44
GenericObjectIteration = 45
HiddenGeneratorReturn = 46
ImplicitResourceToStringCast = 47
ImplicitToStringCast = 48
ImpossibleArrayAccess = 49
ImpossibleArrayAssignment = 50
ImpossibleAssignment = 51
ImpossibleCondition = 52
ImpossibleKeyCheck = 53
ImpossibleNonnullEntryCheck = 54
ImpossibleNullTypeComparison = 55
ImpossibleTypeComparison = 56
ImpureConstruct = 57
ImpureStaticVariable = 58
IncompatibleConstantAccess = 59
IncompatibleConstantOverride = 60
IncompatibleConstantType = 61
IncompatibleConstantVisibility = 62
IncompatibleParameterCount = 63
IncompatibleParameterName = 64
IncompatibleParameterType = 65
IncompatiblePropertyAccess = 66
IncompatiblePropertyDefault = 67
IncompatiblePropertyHookParameterType = 68
IncompatiblePropertyHookSignature = 69
IncompatiblePropertyOverride = 70
IncompatiblePropertyReadonly = 71
IncompatiblePropertyStatic = 72
IncompatiblePropertyType = 73
IncompatiblePropertyVisibility = 74
IncompatibleReadonlyModifier = 75
IncompatibleReturnType = 76
IncompatibleStaticModifier = 77
IncompatibleTemplateLowerBound = 78
IncompatibleVisibility = 79
InconsistentTemplate = 80
InterfaceInstantiation = 81
InvalidArgument = 82
InvalidArrayAccess = 83
InvalidArrayAccessAssignmentValue = 84
InvalidArrayElement = 85
InvalidArrayElementKey = 86
InvalidArrayIndex = 87
InvalidAssignment = 88
InvalidAttributeTarget = 89
InvalidBreak = 90
InvalidCallable = 91
InvalidCatchType = 92
InvalidCatchTypeNotClassOrInterface = 93
InvalidClassConstantOnString = 94
InvalidClassStringExpression = 95
InvalidClone = 96
InvalidConstantSelector = 97
InvalidContinue = 98
InvalidDestructuringSource = 99
InvalidDocblock = 100
InvalidEnumCaseValue = 101
InvalidExtend = 102
InvalidForeachKey = 103
InvalidForeachValue = 104
InvalidGeneratorReturnType = 105
InvalidGlobal = 106
InvalidImplement = 107
InvalidIssetExpression = 108
InvalidIterator = 109
InvalidMemberSelector = 110
InvalidMethodAccess = 111
InvalidNamedArgument = 112
InvalidOperand = 113
InvalidOverrideAttribute = 114
InvalidParentType = 115
InvalidPassByReference = 116
InvalidPropertyAccess = 117
InvalidPropertyAssignmentValue = 118
InvalidPropertyRead = 119
InvalidPropertyWrite = 120
InvalidReturnStatement = 121
InvalidScopeKeywordContext = 122
InvalidStaticMethodAccess = 123
InvalidStaticMethodCall = 124
InvalidStaticPropertyAccess = 125
InvalidTemplateParameter = 126
InvalidThrow = 127
InvalidTraitAliasModifier = 128
InvalidTraitUse = 129
InvalidTypeCast = 130
InvalidUnset = 131
InvalidYieldKeyType = 132
InvalidYieldValueType = 133
LessSpecificArgument = 134
LessSpecificNestedArgumentType = 135
LessSpecificNestedReturnStatement = 136
LessSpecificReturnStatement = 137
ListUsedInReadContext = 138
MatchArmAlwaysTrue = 139
MatchDefaultArmAlwaysExecuted = 140
MatchExpressionOnlyDefaultArm = 141
MatchNotExhaustive = 142
MatchSubjectTypeIsNever = 143
MethodAccessOnNull = 144
MismatchedArrayIndex = 145
MissingConstantType = 146
MissingConstructor = 147
MissingMagicMethod = 148
MissingOverrideAttribute = 149
MissingParameterType = 150
MissingPropertyType = 151
MissingRequiredInterface = 152
MissingRequiredParent = 153
MissingReturnStatement = 154
MissingReturnType = 155
MissingTemplateParameter = 156
MixedArgument = 157
MixedArrayAccess = 158
MixedArrayAssignment = 159
MixedArrayIndex = 160
MixedAssignment = 161
MixedClone = 162
MixedDestructuringShape = 163
MixedMethodAccess = 164
MixedOperand = 165
MixedPropertyAccess = 166
MixedPropertyTypeCoercion = 167
MixedReturnStatement = 168
NameAlreadyInUse = 169
NamedArgumentAfterPositional = 170
NamedArgumentNotAllowed = 171
NamedArgumentOverridesPositional = 172
NeverMatchingSwitchCase = 173
NeverReturn = 174
NoValidCatchTypeFound = 175
NoValue = 176
NonClassUsedAsAttribute = 177
NonDocumentedConstant = 178
NonDocumentedMethod = 179
NonDocumentedProperty = 180
NonExistentAttributeClass = 181
NonExistentCatchType = 182
NonExistentClass = 183
NonExistentClassConstant = 184
NonExistentClassLike = 185
NonExistentConstant = 186
NonExistentFunction = 187
NonExistentMethod = 188
NonExistentProperty = 189
NonExistentUseImport = 190
NonIterableObjectIteration = 191
NonStaticAbstractImplementation = 192
NullArgument = 193
NullArrayAccess = 194
NullArrayIndex = 195
NullIterator = 196
NullOperand = 197
NullPropertyAccess = 198
NullableReturnStatement = 199
OverrideFinalConstant = 200
OverrideFinalMethod = 201
OverrideFinalProperty = 202
OverrideFinalPropertyHook = 203
ParadoxicalCondition = 204
ParentOutsideClassScope = 205
PossibleMethodAccessOnNull = 206
PossiblyFalseArgument = 207
PossiblyFalseIterator = 208
PossiblyFalseOperand = 209
PossiblyInvalidArgument = 210
PossiblyInvalidClone = 211
PossiblyInvalidIterator = 212
PossiblyInvalidOperand = 213
PossiblyNonExistentMethod = 214
PossiblyNonExistentProperty = 215
PossiblyNullArgument = 216
PossiblyNullArrayAccess = 217
PossiblyNullArrayIndex = 218
PossiblyNullIterator = 219
PossiblyNullOperand = 220
PossiblyNullPropertyAccess = 221
PossiblyStaticAccessOnInterface = 222
PossiblyUndefinedArrayIndex = 223
PossiblyUndefinedIntArrayIndex = 224
PossiblyUndefinedStringArrayIndex = 225
PossiblyUndefinedVariable = 226
PropertyTypeCoercion = 227
PsalmTrace = 228
RedundantCast = 229
RedundantComparison = 230
RedundantCondition = 231
RedundantDocblockType = 232
RedundantIssetCheck = 233
RedundantKeyCheck = 234
RedundantLogicalOperation = 235
RedundantNonnullEntryCheck = 236
RedundantNonnullTypeComparison = 237
RedundantNullCoalesce = 238
RedundantNullsafeOperator = 239
RedundantTypeComparison = 240
ReferenceConstraintViolation = 241
ReferenceReusedFromConfusingScope = 242
ReferenceToUndefinedVariable = 243
SelfOutsideClassScope = 244
SkipInKeyedDestructuring = 245
SpreadInDestructuring = 246
StaticAccessOnInterface = 247
StaticOutsideClassScope = 248
StringConstantSelector = 249
StringMemberSelector = 250
TemplateConstraintViolation = 251
TooFewArguments = 252
TooManyArguments = 253
TraitConstantOverride = 254
TraitInstantiation = 255
TypeConfirmation = 256
TypeInspection = 257
UndefinedIntArrayIndex = 258
UndefinedStringArrayIndex = 259
UndefinedVariable = 260
UndefinedVariableInClosureUse = 261
UnevaluatedCode = 262
UnhandledThrownType = 263
UnimplementedAbstractMethod = 264
UnimplementedAbstractPropertyHook = 265
UninitializedProperty = 266
UnknownClassInstantiation = 267
UnknownConstantSelectorType = 268
UnknownIteratorType = 269
UnknownMatchSubjectType = 270
UnknownMemberSelectorType = 271
UnknownYieldFromIteratorType = 272
UnreachableMatchArm = 273
UnreachableMatchDefaultArm = 274
UnreachableSwitchCase = 275
UnreachableSwitchDefault = 276
UnsafeInstantiation = 277
UnusedFunctionCall = 278
UnusedMethod = 279
UnusedMethodCall = 280
UnusedParameter = 281
UnusedProperty = 282
UnusedStatement = 283
UnusedTemplateParameter = 284
UselessControlFlow = 285
WhereConstraintViolation = 286
WriteOnlyProperty = 287
YieldFromInvalidKeyType = 288
YieldFromInvalidSendType = 289
YieldFromInvalidValueType = 290
YieldFromNonIterable = 291
YieldOutsideFunction = 292
Implementations§
Trait Implementations§
Source§impl Ord for IssueCode
impl Ord for IssueCode
Source§impl PartialOrd for IssueCode
impl PartialOrd for IssueCode
impl Copy for IssueCode
impl Eq for IssueCode
impl StructuralPartialEq for IssueCode
Auto Trait Implementations§
impl Freeze for IssueCode
impl RefUnwindSafe for IssueCode
impl Send for IssueCode
impl Sync for IssueCode
impl Unpin for IssueCode
impl UnwindSafe for IssueCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);