style

Macro style 

Source
macro_rules! style {
    () => { ... };
    ($head:expr $(, $tail:expr)* $(,)?) => { ... };
}
Expand description

Constructs a RenderStyle by chaining style elements.

This macro builds up a recursive style chain using RenderStyle::Styled, with the final fallback being RenderStyle::Plain.

ยงExamples

use overture::prelude::*;

let style_chain = style![ANSISequence::Bold, ANSISequence::Underline];

match style_chain {
    RenderStyle::Styled(_, _) => { /* success */ },
    _ => panic!("Expected styled chain"),
}