Expand description
Modules§
Macros§
- format
alloc
andmacros
- Create a
stylish::String
using interpolation of runtime elements. - format_
args macros
- Constructs parameters for the other string-formatting macros.
- write
- Writes attributed and formatted data into a buffer.
- writeln
- Write attributed and formatted data into a buffer, with a newline appended.
Structs§
- Arguments
- A precompiled version of a format string and its by-reference arguments.
- Background
- A
Restyle
implementor for settingStyle::background
. - Error
- The error type which is returned from formatting a message into a stream.
- Foreground
- A
Restyle
implementor for settingStyle::foreground
. - Formatter
- A configured output stream.
- String
alloc
- An attributed version of
alloc::string::String
which has a specificStyle
associated with each character. - Style
- A style to render text with, setting the foreground and background colors, along with intensity.
- Style
Diff - A diff between two styles.
Enums§
- Color
- A color that can be used with
Foreground
to modifyStyle::foreground
orBackground
to modifyStyle::background
. - Intensity
- An intensity to render text with, to emphasise or de-emphasise it as needed.
Traits§
- Display
- Format trait for the
stylish
format,{:s}
. - Restyle
- A trait for modifications to
Style
, allowing an ergonomic API withStyle::with
andstylish::Formatter::with
. - ToStylish
String alloc
andmacros
- A trait for converting a value to a
stylish::String
. - Write
- A trait for writing or formatting into attributed Unicode-accepting buffers or streams.
Functions§
- format
alloc
- The
format
function takes astylish::Arguments
struct and returns the resulting attributed and formattedstylish::String
.
Type Aliases§
- Result
- The type returned by formatter methods.