Skip to content

Byte

1 min read

No import is needed.

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

compare

Orders this value against other.

public fun compare(other: byte): int

min

The smaller of this and other.

public fun min(other: byte): byte

max

The larger of this and other.

public fun max(other: byte): byte

clamp

This value constrained to the inclusive range [lo, hi].

public fun clamp(lo: byte, hi: byte): byte

parse

Parses an unsigned decimal byte from text.

public static fun parse(borrow text: string): Result<byte, ParseError>