std/unit
The Unit type — “no meaningful value.”
Unit is the return type of side-effecting operations (IO.print,
Timer.sleep, Iter.each) and the value produced by a bare
break. There is exactly one Unit value and it carries no
information, so there is nothing to construct or inspect — a function
returning Unit is called for its effect.
Import with import std/unit.
Exports
Section titled “Exports”Types
type Unit
Section titled “type Unit”type Unit
No meaningful value. Returned by side-effecting functions such as
IO.print; produced by bare break.
Unit.inspect
Section titled “Unit.inspect”impl Debug
fn inspect(value: Unit): String
impl Debug.inspect