struct StyledContent
source · line 44public
public struct StyledContent<T : ToString>(val style: ContentStyle, val content: T) : Command, ToString
Serializes style, content, and the corresponding reset commands. It restores terminal defaults for changed channels rather than saving and restoring an arbitrary prior style.
constructor constructor
source · line 44public
constructor(val style: ContentStyle, val content: T)
parameter style
source · line 44public
val style: ContentStyle
parameter content
source · line 44public
val content: T
function toString
source · line 66public
public override fun toString(): String
- Overrides
toString
Returns the complete ANSI-styled content string using the current color policy.
field style
source · line 44public
val style: ContentStyle
type parameter T
source · line 44public
T : ToString
field content
source · line 44public
val content: T
function writeAnsi
source · line 49public
public override fun writeAnsi(writer: TextWriter): Unit
- Overrides
writeAnsi· Command
Writes this command's ANSI representation to the supplied writer without flushing it. Parameter validation happens before or during serialization.
parameter writer
source · line 49public
writer: TextWriter
function equals
source · line 44publiccompiler-derived
operator fun equals(other: StyledContent<T>): Boolean
This derived operation is available when each field or payload type supports same-type equality. Required types: ContentStyle, T.