Slackblocks.RichText.Style (slackblocks v2.8.0)

View Source

Optional rich-text flags. Unsupported flags are rejected by their receiving field.

Summary

Functions

Constructs boolean style flags; nil omits a flag and false is preserved.

Like new/1, raising on failure.

Types

t()

@type t() :: %Slackblocks.RichText.Style{
  bold: boolean() | nil,
  client_highlight: boolean() | nil,
  code: boolean() | nil,
  highlight: boolean() | nil,
  italic: boolean() | nil,
  strike: boolean() | nil,
  unlink: boolean() | nil
}

Functions

new(options \\ [])

@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}

Constructs boolean style flags; nil omits a flag and false is preserved.

new!(options \\ [])

@spec new!(keyword()) :: t()

Like new/1, raising on failure.