#[non_exhaustive]#[repr(u16)]pub enum IssueCode {
Show 292 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,
DuplicateNamedArgument = 32,
DynamicStaticMethodCall = 33,
EmptyMatchExpression = 34,
EnumInstantiation = 35,
EnumIteration = 36,
ExcessTemplateParameter = 37,
ExpressionIsTooComplex = 38,
ExtendFinalClass = 39,
FalsableReturnStatement = 40,
FalseArgument = 41,
FalseIterator = 42,
FalseOperand = 43,
GenericObjectIteration = 44,
HiddenGeneratorReturn = 45,
ImplicitResourceToStringCast = 46,
ImplicitToStringCast = 47,
ImpossibleArrayAccess = 48,
ImpossibleArrayAssignment = 49,
ImpossibleAssignment = 50,
ImpossibleCondition = 51,
ImpossibleKeyCheck = 52,
ImpossibleNonnullEntryCheck = 53,
ImpossibleNullTypeComparison = 54,
ImpossibleTypeComparison = 55,
ImpureConstruct = 56,
ImpureStaticVariable = 57,
IncompatibleConstantAccess = 58,
IncompatibleConstantOverride = 59,
IncompatibleConstantType = 60,
IncompatibleConstantVisibility = 61,
IncompatibleParameterCount = 62,
IncompatibleParameterName = 63,
IncompatibleParameterType = 64,
IncompatiblePropertyAccess = 65,
IncompatiblePropertyDefault = 66,
IncompatiblePropertyHookParameterType = 67,
IncompatiblePropertyHookSignature = 68,
IncompatiblePropertyOverride = 69,
IncompatiblePropertyReadonly = 70,
IncompatiblePropertyStatic = 71,
IncompatiblePropertyType = 72,
IncompatiblePropertyVisibility = 73,
IncompatibleReadonlyModifier = 74,
IncompatibleReturnType = 75,
IncompatibleStaticModifier = 76,
IncompatibleTemplateLowerBound = 77,
IncompatibleVisibility = 78,
InconsistentTemplate = 79,
InterfaceInstantiation = 80,
InvalidArgument = 81,
InvalidArrayAccess = 82,
InvalidArrayAccessAssignmentValue = 83,
InvalidArrayElement = 84,
InvalidArrayElementKey = 85,
InvalidArrayIndex = 86,
InvalidAssignment = 87,
InvalidAttributeTarget = 88,
InvalidBreak = 89,
InvalidCallable = 90,
InvalidCatchType = 91,
InvalidCatchTypeNotClassOrInterface = 92,
InvalidClassConstantOnString = 93,
InvalidClassStringExpression = 94,
InvalidClone = 95,
InvalidConstantSelector = 96,
InvalidContinue = 97,
InvalidDestructuringSource = 98,
InvalidDocblock = 99,
InvalidEnumCaseValue = 100,
InvalidExtend = 101,
InvalidForeachKey = 102,
InvalidForeachValue = 103,
InvalidGeneratorReturnType = 104,
InvalidGlobal = 105,
InvalidImplement = 106,
InvalidIssetExpression = 107,
InvalidIterator = 108,
InvalidMemberSelector = 109,
InvalidMethodAccess = 110,
InvalidNamedArgument = 111,
InvalidOperand = 112,
InvalidOverrideAttribute = 113,
InvalidParentType = 114,
InvalidPassByReference = 115,
InvalidPropertyAccess = 116,
InvalidPropertyAssignmentValue = 117,
InvalidPropertyRead = 118,
InvalidPropertyWrite = 119,
InvalidReturnStatement = 120,
InvalidScopeKeywordContext = 121,
InvalidStaticMethodAccess = 122,
InvalidStaticMethodCall = 123,
InvalidStaticPropertyAccess = 124,
InvalidTemplateParameter = 125,
InvalidThrow = 126,
InvalidTraitAliasModifier = 127,
InvalidTraitUse = 128,
InvalidTypeCast = 129,
InvalidUnset = 130,
InvalidYieldKeyType = 131,
InvalidYieldValueType = 132,
LessSpecificArgument = 133,
LessSpecificNestedArgumentType = 134,
LessSpecificNestedReturnStatement = 135,
LessSpecificReturnStatement = 136,
ListUsedInReadContext = 137,
MatchArmAlwaysTrue = 138,
MatchDefaultArmAlwaysExecuted = 139,
MatchExpressionOnlyDefaultArm = 140,
MatchNotExhaustive = 141,
MatchSubjectTypeIsNever = 142,
MethodAccessOnNull = 143,
MismatchedArrayIndex = 144,
MissingConstantType = 145,
MissingConstructor = 146,
MissingMagicMethod = 147,
MissingOverrideAttribute = 148,
MissingParameterType = 149,
MissingPropertyType = 150,
MissingRequiredInterface = 151,
MissingRequiredParent = 152,
MissingReturnStatement = 153,
MissingReturnType = 154,
MissingTemplateParameter = 155,
MixedArgument = 156,
MixedArrayAccess = 157,
MixedArrayAssignment = 158,
MixedArrayIndex = 159,
MixedAssignment = 160,
MixedClone = 161,
MixedDestructuringShape = 162,
MixedMethodAccess = 163,
MixedOperand = 164,
MixedPropertyAccess = 165,
MixedPropertyTypeCoercion = 166,
MixedReturnStatement = 167,
NameAlreadyInUse = 168,
NamedArgumentAfterPositional = 169,
NamedArgumentNotAllowed = 170,
NamedArgumentOverridesPositional = 171,
NeverMatchingSwitchCase = 172,
NeverReturn = 173,
NoValidCatchTypeFound = 174,
NoValue = 175,
NonClassUsedAsAttribute = 176,
NonDocumentedConstant = 177,
NonDocumentedMethod = 178,
NonDocumentedProperty = 179,
NonExistentAttributeClass = 180,
NonExistentCatchType = 181,
NonExistentClass = 182,
NonExistentClassConstant = 183,
NonExistentClassLike = 184,
NonExistentConstant = 185,
NonExistentFunction = 186,
NonExistentMethod = 187,
NonExistentProperty = 188,
NonExistentUseImport = 189,
NonIterableObjectIteration = 190,
NonStaticAbstractImplementation = 191,
NullArgument = 192,
NullArrayAccess = 193,
NullArrayIndex = 194,
NullIterator = 195,
NullOperand = 196,
NullPropertyAccess = 197,
NullableReturnStatement = 198,
OverrideFinalConstant = 199,
OverrideFinalMethod = 200,
OverrideFinalProperty = 201,
OverrideFinalPropertyHook = 202,
ParadoxicalCondition = 203,
ParentOutsideClassScope = 204,
PossibleMethodAccessOnNull = 205,
PossiblyFalseArgument = 206,
PossiblyFalseIterator = 207,
PossiblyFalseOperand = 208,
PossiblyInvalidArgument = 209,
PossiblyInvalidClone = 210,
PossiblyInvalidIterator = 211,
PossiblyInvalidOperand = 212,
PossiblyNonExistentMethod = 213,
PossiblyNonExistentProperty = 214,
PossiblyNullArgument = 215,
PossiblyNullArrayAccess = 216,
PossiblyNullArrayIndex = 217,
PossiblyNullIterator = 218,
PossiblyNullOperand = 219,
PossiblyNullPropertyAccess = 220,
PossiblyStaticAccessOnInterface = 221,
PossiblyUndefinedArrayIndex = 222,
PossiblyUndefinedIntArrayIndex = 223,
PossiblyUndefinedStringArrayIndex = 224,
PossiblyUndefinedVariable = 225,
PropertyTypeCoercion = 226,
PsalmTrace = 227,
RedundantCast = 228,
RedundantComparison = 229,
RedundantCondition = 230,
RedundantDocblockType = 231,
RedundantIssetCheck = 232,
RedundantKeyCheck = 233,
RedundantLogicalOperation = 234,
RedundantNonnullEntryCheck = 235,
RedundantNonnullTypeComparison = 236,
RedundantNullCoalesce = 237,
RedundantNullsafeOperator = 238,
RedundantTypeComparison = 239,
ReferenceConstraintViolation = 240,
ReferenceReusedFromConfusingScope = 241,
ReferenceToUndefinedVariable = 242,
SelfOutsideClassScope = 243,
SkipInKeyedDestructuring = 244,
SpreadInDestructuring = 245,
StaticAccessOnInterface = 246,
StaticOutsideClassScope = 247,
StringConstantSelector = 248,
StringMemberSelector = 249,
TemplateConstraintViolation = 250,
TooFewArguments = 251,
TooManyArguments = 252,
TraitConstantOverride = 253,
TraitInstantiation = 254,
TypeConfirmation = 255,
TypeInspection = 256,
UndefinedIntArrayIndex = 257,
UndefinedStringArrayIndex = 258,
UndefinedVariable = 259,
UndefinedVariableInClosureUse = 260,
UnevaluatedCode = 261,
UnhandledThrownType = 262,
UnimplementedAbstractMethod = 263,
UnimplementedAbstractPropertyHook = 264,
UninitializedProperty = 265,
UnknownClassInstantiation = 266,
UnknownConstantSelectorType = 267,
UnknownIteratorType = 268,
UnknownMatchSubjectType = 269,
UnknownMemberSelectorType = 270,
UnknownYieldFromIteratorType = 271,
UnreachableMatchArm = 272,
UnreachableMatchDefaultArm = 273,
UnreachableSwitchCase = 274,
UnreachableSwitchDefault = 275,
UnsafeInstantiation = 276,
UnusedFunctionCall = 277,
UnusedMethod = 278,
UnusedMethodCall = 279,
UnusedParameter = 280,
UnusedProperty = 281,
UnusedStatement = 282,
UnusedTemplateParameter = 283,
UselessControlFlow = 284,
WhereConstraintViolation = 285,
WriteOnlyProperty = 286,
YieldFromInvalidKeyType = 287,
YieldFromInvalidSendType = 288,
YieldFromInvalidValueType = 289,
YieldFromNonIterable = 290,
YieldOutsideFunction = 291,
}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
DuplicateNamedArgument = 32
DynamicStaticMethodCall = 33
EmptyMatchExpression = 34
EnumInstantiation = 35
EnumIteration = 36
ExcessTemplateParameter = 37
ExpressionIsTooComplex = 38
ExtendFinalClass = 39
FalsableReturnStatement = 40
FalseArgument = 41
FalseIterator = 42
FalseOperand = 43
GenericObjectIteration = 44
HiddenGeneratorReturn = 45
ImplicitResourceToStringCast = 46
ImplicitToStringCast = 47
ImpossibleArrayAccess = 48
ImpossibleArrayAssignment = 49
ImpossibleAssignment = 50
ImpossibleCondition = 51
ImpossibleKeyCheck = 52
ImpossibleNonnullEntryCheck = 53
ImpossibleNullTypeComparison = 54
ImpossibleTypeComparison = 55
ImpureConstruct = 56
ImpureStaticVariable = 57
IncompatibleConstantAccess = 58
IncompatibleConstantOverride = 59
IncompatibleConstantType = 60
IncompatibleConstantVisibility = 61
IncompatibleParameterCount = 62
IncompatibleParameterName = 63
IncompatibleParameterType = 64
IncompatiblePropertyAccess = 65
IncompatiblePropertyDefault = 66
IncompatiblePropertyHookParameterType = 67
IncompatiblePropertyHookSignature = 68
IncompatiblePropertyOverride = 69
IncompatiblePropertyReadonly = 70
IncompatiblePropertyStatic = 71
IncompatiblePropertyType = 72
IncompatiblePropertyVisibility = 73
IncompatibleReadonlyModifier = 74
IncompatibleReturnType = 75
IncompatibleStaticModifier = 76
IncompatibleTemplateLowerBound = 77
IncompatibleVisibility = 78
InconsistentTemplate = 79
InterfaceInstantiation = 80
InvalidArgument = 81
InvalidArrayAccess = 82
InvalidArrayAccessAssignmentValue = 83
InvalidArrayElement = 84
InvalidArrayElementKey = 85
InvalidArrayIndex = 86
InvalidAssignment = 87
InvalidAttributeTarget = 88
InvalidBreak = 89
InvalidCallable = 90
InvalidCatchType = 91
InvalidCatchTypeNotClassOrInterface = 92
InvalidClassConstantOnString = 93
InvalidClassStringExpression = 94
InvalidClone = 95
InvalidConstantSelector = 96
InvalidContinue = 97
InvalidDestructuringSource = 98
InvalidDocblock = 99
InvalidEnumCaseValue = 100
InvalidExtend = 101
InvalidForeachKey = 102
InvalidForeachValue = 103
InvalidGeneratorReturnType = 104
InvalidGlobal = 105
InvalidImplement = 106
InvalidIssetExpression = 107
InvalidIterator = 108
InvalidMemberSelector = 109
InvalidMethodAccess = 110
InvalidNamedArgument = 111
InvalidOperand = 112
InvalidOverrideAttribute = 113
InvalidParentType = 114
InvalidPassByReference = 115
InvalidPropertyAccess = 116
InvalidPropertyAssignmentValue = 117
InvalidPropertyRead = 118
InvalidPropertyWrite = 119
InvalidReturnStatement = 120
InvalidScopeKeywordContext = 121
InvalidStaticMethodAccess = 122
InvalidStaticMethodCall = 123
InvalidStaticPropertyAccess = 124
InvalidTemplateParameter = 125
InvalidThrow = 126
InvalidTraitAliasModifier = 127
InvalidTraitUse = 128
InvalidTypeCast = 129
InvalidUnset = 130
InvalidYieldKeyType = 131
InvalidYieldValueType = 132
LessSpecificArgument = 133
LessSpecificNestedArgumentType = 134
LessSpecificNestedReturnStatement = 135
LessSpecificReturnStatement = 136
ListUsedInReadContext = 137
MatchArmAlwaysTrue = 138
MatchDefaultArmAlwaysExecuted = 139
MatchExpressionOnlyDefaultArm = 140
MatchNotExhaustive = 141
MatchSubjectTypeIsNever = 142
MethodAccessOnNull = 143
MismatchedArrayIndex = 144
MissingConstantType = 145
MissingConstructor = 146
MissingMagicMethod = 147
MissingOverrideAttribute = 148
MissingParameterType = 149
MissingPropertyType = 150
MissingRequiredInterface = 151
MissingRequiredParent = 152
MissingReturnStatement = 153
MissingReturnType = 154
MissingTemplateParameter = 155
MixedArgument = 156
MixedArrayAccess = 157
MixedArrayAssignment = 158
MixedArrayIndex = 159
MixedAssignment = 160
MixedClone = 161
MixedDestructuringShape = 162
MixedMethodAccess = 163
MixedOperand = 164
MixedPropertyAccess = 165
MixedPropertyTypeCoercion = 166
MixedReturnStatement = 167
NameAlreadyInUse = 168
NamedArgumentAfterPositional = 169
NamedArgumentNotAllowed = 170
NamedArgumentOverridesPositional = 171
NeverMatchingSwitchCase = 172
NeverReturn = 173
NoValidCatchTypeFound = 174
NoValue = 175
NonClassUsedAsAttribute = 176
NonDocumentedConstant = 177
NonDocumentedMethod = 178
NonDocumentedProperty = 179
NonExistentAttributeClass = 180
NonExistentCatchType = 181
NonExistentClass = 182
NonExistentClassConstant = 183
NonExistentClassLike = 184
NonExistentConstant = 185
NonExistentFunction = 186
NonExistentMethod = 187
NonExistentProperty = 188
NonExistentUseImport = 189
NonIterableObjectIteration = 190
NonStaticAbstractImplementation = 191
NullArgument = 192
NullArrayAccess = 193
NullArrayIndex = 194
NullIterator = 195
NullOperand = 196
NullPropertyAccess = 197
NullableReturnStatement = 198
OverrideFinalConstant = 199
OverrideFinalMethod = 200
OverrideFinalProperty = 201
OverrideFinalPropertyHook = 202
ParadoxicalCondition = 203
ParentOutsideClassScope = 204
PossibleMethodAccessOnNull = 205
PossiblyFalseArgument = 206
PossiblyFalseIterator = 207
PossiblyFalseOperand = 208
PossiblyInvalidArgument = 209
PossiblyInvalidClone = 210
PossiblyInvalidIterator = 211
PossiblyInvalidOperand = 212
PossiblyNonExistentMethod = 213
PossiblyNonExistentProperty = 214
PossiblyNullArgument = 215
PossiblyNullArrayAccess = 216
PossiblyNullArrayIndex = 217
PossiblyNullIterator = 218
PossiblyNullOperand = 219
PossiblyNullPropertyAccess = 220
PossiblyStaticAccessOnInterface = 221
PossiblyUndefinedArrayIndex = 222
PossiblyUndefinedIntArrayIndex = 223
PossiblyUndefinedStringArrayIndex = 224
PossiblyUndefinedVariable = 225
PropertyTypeCoercion = 226
PsalmTrace = 227
RedundantCast = 228
RedundantComparison = 229
RedundantCondition = 230
RedundantDocblockType = 231
RedundantIssetCheck = 232
RedundantKeyCheck = 233
RedundantLogicalOperation = 234
RedundantNonnullEntryCheck = 235
RedundantNonnullTypeComparison = 236
RedundantNullCoalesce = 237
RedundantNullsafeOperator = 238
RedundantTypeComparison = 239
ReferenceConstraintViolation = 240
ReferenceReusedFromConfusingScope = 241
ReferenceToUndefinedVariable = 242
SelfOutsideClassScope = 243
SkipInKeyedDestructuring = 244
SpreadInDestructuring = 245
StaticAccessOnInterface = 246
StaticOutsideClassScope = 247
StringConstantSelector = 248
StringMemberSelector = 249
TemplateConstraintViolation = 250
TooFewArguments = 251
TooManyArguments = 252
TraitConstantOverride = 253
TraitInstantiation = 254
TypeConfirmation = 255
TypeInspection = 256
UndefinedIntArrayIndex = 257
UndefinedStringArrayIndex = 258
UndefinedVariable = 259
UndefinedVariableInClosureUse = 260
UnevaluatedCode = 261
UnhandledThrownType = 262
UnimplementedAbstractMethod = 263
UnimplementedAbstractPropertyHook = 264
UninitializedProperty = 265
UnknownClassInstantiation = 266
UnknownConstantSelectorType = 267
UnknownIteratorType = 268
UnknownMatchSubjectType = 269
UnknownMemberSelectorType = 270
UnknownYieldFromIteratorType = 271
UnreachableMatchArm = 272
UnreachableMatchDefaultArm = 273
UnreachableSwitchCase = 274
UnreachableSwitchDefault = 275
UnsafeInstantiation = 276
UnusedFunctionCall = 277
UnusedMethod = 278
UnusedMethodCall = 279
UnusedParameter = 280
UnusedProperty = 281
UnusedStatement = 282
UnusedTemplateParameter = 283
UselessControlFlow = 284
WhereConstraintViolation = 285
WriteOnlyProperty = 286
YieldFromInvalidKeyType = 287
YieldFromInvalidSendType = 288
YieldFromInvalidValueType = 289
YieldFromNonIterable = 290
YieldOutsideFunction = 291
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);