Lyricdev
GitHub

interface Display

pub interface Display

Renders a value as text: {x} in an f-string renders through show().

The scalars render natively and conform here, so a constraint T :: [Display] takes them.

Methods

fn show(): string
fn showTo(out: StringBuilder): void

Appends the text to out.

F-strings and the containers call it, so a text is built in one buffer. The default appends show(); a type that can write itself directly overrides it.