spruce/symbol

Named terminal glyphs and ASCII fallbacks.

Use the Unicode constants for rich terminal output, and the _ascii constants when output must stay plain ASCII.

Types

Glyph rendering mode.

pub type Mode {
  Unicode
  Ascii
}

Constructors

  • Unicode
  • Ascii

Named status glyphs.

pub type Status {
  Info
  Warn
  Error
  Success
  Start
  Trace
  Debug
  Notice
  Alert
  Bullet
  Arrow
}

Constructors

  • Info
  • Warn
  • Error
  • Success
  • Start
  • Trace
  • Debug
  • Notice
  • Alert
  • Bullet
  • Arrow

Values

pub const alert: String

Alert message glyph.

pub const arrow: String

Disclosure arrow glyph.

pub const arrow_ascii: String

ASCII disclosure arrow glyph.

pub const bullet: String

Bullet list glyph.

pub const bullet_ascii: String

ASCII bullet list glyph.

pub const debug: String

Debug message glyph.

pub const error: String

Error message glyph.

pub const error_ascii: String

ASCII error glyph.

pub const info: String

Informational message glyph.

pub const info_ascii: String

ASCII informational glyph.

pub const notice: String

Notice message glyph.

pub fn resolve(
  mode: Mode,
  unicode unicode: String,
  ascii ascii: String,
) -> String

Resolve a glyph pair according to the requested mode.

pub const start: String

In-progress/start glyph.

pub const start_ascii: String

ASCII in-progress/start glyph.

pub fn status(mode: Mode, status: Status) -> String

Resolve a named status glyph according to the requested mode.

pub const success: String

Success message glyph.

pub const success_ascii: String

ASCII success glyph.

pub const trace: String

Trace/detail glyph.

pub const warn: String

Warning message glyph.

pub const warn_ascii: String

ASCII warning glyph.

Search Document