Crate stylish_core

Source
Expand description

The semver-stable subset of stylish.

See the main documentation in stylish, there is no reason to depend on this crate directly.

Modules§

iostd
Traits and associated types for writing stylish attributed data to fallible IO sinks.

Macros§

formatalloc and macros
Create a stylish::String using interpolation of runtime elements.
format_argsmacros
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 setting Style::background.
Error
The error type which is returned from formatting a message into a stream.
Foreground
A Restyle implementor for setting Style::foreground.
Formatter
A configured output stream.
Stringalloc
An attributed version of alloc::string::String which has a specific Style associated with each character.
Style
A style to render text with, setting the foreground and background colors, along with intensity.
StyleDiff
A diff between two styles.

Enums§

Color
A color that can be used with Foreground to modify Style::foreground or Background to modify Style::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 with Style::with and stylish::Formatter::with.
ToStylishStringalloc and macros
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§

formatalloc
The format function takes a stylish::Arguments struct and returns the resulting attributed and formatted stylish::String.

Type Aliases§

Result
The type returned by formatter methods.