Plushie.Type.Direction (Plushie v0.6.0)

Copy Markdown View Source

Orientation for the scrollable direction prop and rule widget.

Maps to iced's horizontal/vertical axis variants.

Summary

Functions

Encodes a direction value to the wire format.

Types

t()

@type t() :: :horizontal | :vertical | :both

Functions

encode(value)

@spec encode(direction :: t()) :: String.t()

Encodes a direction value to the wire format.

Examples

iex> Plushie.Type.Direction.encode(:horizontal)
"horizontal"

iex> Plushie.Type.Direction.encode(:vertical)
"vertical"

iex> Plushie.Type.Direction.encode(:both)
"both"