Skip to main content

Module choice

Module choice 

Source
Expand description

Alternative formats and their ambiguity conditions.

Choice uses a structural sum and requires disjoint parse domains for round trips. Alt is defined over a single value type and is malleable by default.

Re-exports§

pub use spec::Sum;

Modules§

exec
Executable trait implementations for this combinator. Executable implementations for ordered alternatives.
proof
Correctness proofs for this combinator. Correctness, disjointness, and malleability proofs for alternatives.
spec
Specification trait implementations for this combinator. Specifications for canonical and deliberately malleable alternatives.

Structs§

Alt
Ordered alternative combinator.
Choice
Ordered choice combinator consuming/producing a sum type.
Dispatch
Dispatch combinator that selects one of N branches based on a “tag” value.