garanti/shared/report

Types

The effect of a token used for semantic highligting.

pub type Effect {
  Positive
  Negative
  Important
  Name
  Bold
  Secondary
}

Constructors

  • Positive

    Positive outcomes of tests, etc.

  • Negative

    Negative outcomes, such as test failures.

  • Important

    Not a failure, but something is not right.

  • Name

    Imporant parts of a message, such as test or suite name.

  • Bold

    Adds additional emphasis to a piece of text

  • Secondary

    Supportive text, fully readable but dot not compete for attention.

The level of importance for the overall message (much like log level).

pub type Level {
  Success
  Error
  Warning
  Info
  Debug
}

Constructors

  • Success
  • Error
  • Warning
  • Info
  • Debug

A message that is part of a test report.

pub type Message {
  Message(level: Level, tokens: List(Token))
}

Constructors

The different types of tokens that can be used to construct a message.

pub type Token {
  Plain(text: String)
  Enriched(text: String, effects: List(Effect))
  Indent
  Block(text: String)
  NewLine
}

Constructors

  • Plain(text: String)

    Plain text string.

  • Enriched(text: String, effects: List(Effect))

    A string with optional effects. Not all effects can be combined (such as combining colors).

  • Indent

    Indent the output (if applicable).

  • Block(text: String)

    Separate the output from the adjacent text (if applicable).

  • NewLine

    Move the output to a new line if applicable.

Values

pub fn important(text: String) -> Token
Search Document