Rust

scalar

Module

Booleans, integers, floats, numbers and numeric ranges.

Contents

use utopia_validators::Boolean;
Rust
pub struct Boolean

A boolean; when loose, also "true", "false", "1", "0", 1 and 0.

use utopia_validators::Float;
Rust
pub struct Float

A float or an integer; when loose, also a numeric string.

use utopia_validators::Integer;
Rust
pub struct Integer

An integer of bits bits (8, 16, 32 or 64), signed or unsigned; when loose, also a numeric string.

Also implements Default.
use utopia_validators::Numeric;
Rust
pub struct Numeric

A number, or a string that spells one.

use utopia_validators::Range;
Rust
pub struct Range

A number between a minimum and a maximum, inclusive, in the Type::Integer or Type::Float format; any other format rejects every value.