Tyyppi.Valuable behaviour (tyyppi v0.9.0) View Source
The behaviour all participants of the Tyyppi
’s operations
should have implemented.
It’s implemented by Tyyppi.Value
and Tyyppi.Struct
, making them available
for deep nested validations, coercion and generation.
Link to this section Summary
Types
Type returned from coercions and validations, typical pair of ok/error tuples,
involving the value()
as a main type behind
Type of the generation function, basically returning a stream of generated values
Type of the value behind the implementation
Callbacks
The coercion function, receiving the value()
The generation function, returning the generator for the whole
The validation function, receiving the value()
Link to this section Types
Specs
Type returned from coercions and validations, typical pair of ok/error tuples,
involving the value()
as a main type behind
Specs
generation() :: StreamData.t(value())
Type of the generation function, basically returning a stream of generated values
Specs
value() :: any()
Type of the value behind the implementation
Link to this section Callbacks
Specs
The coercion function, receiving the value()
Specs
generation(value()) :: generation()
The generation function, returning the generator for the whole
Specs
The validation function, receiving the value()