Documentation ¶
Overview ¶
Code generated by mkunion. DO NOT EDIT.
Code generated by mkunion. DO NOT EDIT.
Code generated by mkunion. DO NOT EDIT.
Code generated by mkunion. DO NOT EDIT.
Index ¶
- func A1Shape() shape.Shape
- func A1ToJSON(x *A1) ([]byte, error)
- func AlphabetSchemaDef() *schema.UnionVariants[Alphabet]
- func AlphabetShape() shape.Shape
- func AlphabetToJSON(x Alphabet) ([]byte, error)
- func B2Shape() shape.Shape
- func B2ToJSON(x *B2) ([]byte, error)
- func BranchShape() shape.Shape
- func BranchToJSON(x *Branch) ([]byte, error)
- func C3Shape() shape.Shape
- func C3ToJSON(x *C3) ([]byte, error)
- func KShape() shape.Shape
- func KToJSON(x *K) ([]byte, error)
- func LeafShape() shape.Shape
- func LeafToJSON(x *Leaf) ([]byte, error)
- func MatchAlphabet[TOut any](x Alphabet, f1 func(x *A1) TOut, f2 func(x *B2) TOut, f3 func(x *C3) TOut, ...) TOut
- func MatchAlphabetNumberTupleR0[T0 Alphabet, T1 Number](t0 T0, t1 T1, f0 func(x0 *A1, x1 *N0), f1 func(x0 *C3, x1 any), ...)
- func MatchAlphabetNumberTupleR1[T0 Alphabet, T1 Number, TOut1 any](t0 T0, t1 T1, f0 func(x0 *A1, x1 *N0) TOut1, f1 func(x0 *C3, x1 any) TOut1, ...) TOut1
- func MatchAlphabetNumberTupleR2[T0 Alphabet, T1 Number, TOut1 any, TOut2 any](t0 T0, t1 T1, f0 func(x0 *A1, x1 *N0) (TOut1, TOut2), ...) (TOut1, TOut2)
- func MatchAlphabetNumberTupleR3[T0 Alphabet, T1 Number, TOut1 any, TOut2 any, TOut3 any](t0 T0, t1 T1, f0 func(x0 *A1, x1 *N0) (TOut1, TOut2, TOut3), ...) (TOut1, TOut2, TOut3)
- func MatchAlphabetR2[TOut1, TOut2 any](x Alphabet, f1 func(x *A1) (TOut1, TOut2), f2 func(x *B2) (TOut1, TOut2), ...) (TOut1, TOut2)
- func MatchNumber[TOut any](x Number, f1 func(x *N0) TOut, f2 func(x *N1) TOut, df func(x Number) TOut) TOut
- func MatchNumberR2[TOut1, TOut2 any](x Number, f1 func(x *N0) (TOut1, TOut2), f2 func(x *N1) (TOut1, TOut2), ...) (TOut1, TOut2)
- func MatchTree[TOut any](x Tree, f1 func(x *Branch) TOut, f2 func(x *Leaf) TOut, f3 func(x *K) TOut, ...) TOut
- func MatchTreeR2[TOut1, TOut2 any](x Tree, f1 func(x *Branch) (TOut1, TOut2), f2 func(x *Leaf) (TOut1, TOut2), ...) (TOut1, TOut2)
- func MustMatchAlphabet[TOut any](x Alphabet, f1 func(x *A1) TOut, f2 func(x *B2) TOut, f3 func(x *C3) TOut) TOut
- func MustMatchAlphabetR0(x Alphabet, f1 func(x *A1), f2 func(x *B2), f3 func(x *C3))
- func MustMatchAlphabetR2[TOut1, TOut2 any](x Alphabet, f1 func(x *A1) (TOut1, TOut2), f2 func(x *B2) (TOut1, TOut2), ...) (TOut1, TOut2)
- func MustMatchNumber[TOut any](x Number, f1 func(x *N0) TOut, f2 func(x *N1) TOut) TOut
- func MustMatchNumberR0(x Number, f1 func(x *N0), f2 func(x *N1))
- func MustMatchNumberR2[TOut1, TOut2 any](x Number, f1 func(x *N0) (TOut1, TOut2), f2 func(x *N1) (TOut1, TOut2)) (TOut1, TOut2)
- func MustMatchTree[TOut any](x Tree, f1 func(x *Branch) TOut, f2 func(x *Leaf) TOut, f3 func(x *K) TOut, ...) TOut
- func MustMatchTreeR0(x Tree, f1 func(x *Branch), f2 func(x *Leaf), f3 func(x *K), f4 func(x *P))
- func MustMatchTreeR2[TOut1, TOut2 any](x Tree, f1 func(x *Branch) (TOut1, TOut2), f2 func(x *Leaf) (TOut1, TOut2), ...) (TOut1, TOut2)
- func N0Shape() shape.Shape
- func N0ToJSON(x *N0) ([]byte, error)
- func N1Shape() shape.Shape
- func N1ToJSON(x *N1) ([]byte, error)
- func NumberSchemaDef() *schema.UnionVariants[Number]
- func NumberShape() shape.Shape
- func NumberToJSON(x Number) ([]byte, error)
- func PShape() shape.Shape
- func PToJSON(x *P) ([]byte, error)
- func TreeSchemaDef() *schema.UnionVariants[Tree]
- func TreeShape() shape.Shape
- func TreeToJSON(x Tree) ([]byte, error)
- type A1
- type Alphabet
- type AlphabetUnionJSON
- type AlphabetVisitor
- type B2
- type Branch
- type C3
- type K
- type Leaf
- type ListOf
- type ListOf2
- type MatchAlphabetNumberTuple
- type N0
- type N1
- type Number
- type NumberUnionJSON
- type NumberVisitor
- type P
- type Tree
- type TreeUnionJSON
- type TreeVisitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlphabetSchemaDef ¶
func AlphabetSchemaDef() *schema.UnionVariants[Alphabet]
func AlphabetToJSON ¶
func BranchShape ¶
func BranchToJSON ¶
func LeafToJSON ¶
func MatchAlphabet ¶
func MatchAlphabetR2 ¶
func MatchNumber ¶
func MatchNumberR2 ¶
func MatchTreeR2 ¶
func MustMatchAlphabet ¶
func MustMatchAlphabetR0 ¶
func MustMatchAlphabetR2 ¶
func MustMatchNumber ¶
func MustMatchNumberR0 ¶
func MustMatchNumberR2 ¶
func MustMatchTree ¶
func MustMatchTreeR0 ¶
func MustMatchTreeR2 ¶
func NumberSchemaDef ¶
func NumberSchemaDef() *schema.UnionVariants[Number]
func NumberToJSON ¶
func TreeSchemaDef ¶
func TreeSchemaDef() *schema.UnionVariants[Tree]
func TreeToJSON ¶
Types ¶
type A1 ¶
type A1 struct{}
func A1FromJSON ¶
func (*A1) AcceptAlphabet ¶
func (r *A1) AcceptAlphabet(v AlphabetVisitor) any
func (*A1) MarshalJSON ¶
func (*A1) UnmarshalJSON ¶
type Alphabet ¶
type Alphabet interface {
AcceptAlphabet(g AlphabetVisitor) any
}
func AlphabetFromJSON ¶
type AlphabetUnionJSON ¶
type AlphabetUnionJSON struct { Type string `json:"$type,omitempty"` A1 json.RawMessage `json:"testutils.A1,omitempty"` B2 json.RawMessage `json:"testutils.B2,omitempty"` C3 json.RawMessage `json:"testutils.C3,omitempty"` }
mkunion-extension:json
type AlphabetVisitor ¶
type B2 ¶
type B2 struct{}
func B2FromJSON ¶
func (*B2) AcceptAlphabet ¶
func (r *B2) AcceptAlphabet(v AlphabetVisitor) any
func (*B2) MarshalJSON ¶
func (*B2) UnmarshalJSON ¶
type Branch ¶
func BranchFromJSON ¶
func (*Branch) AcceptTree ¶
func (r *Branch) AcceptTree(v TreeVisitor) any
func (*Branch) MarshalJSON ¶
func (*Branch) UnmarshalJSON ¶
type C3 ¶
type C3 struct{}
func C3FromJSON ¶
func (*C3) AcceptAlphabet ¶
func (r *C3) AcceptAlphabet(v AlphabetVisitor) any
func (*C3) MarshalJSON ¶
func (*C3) UnmarshalJSON ¶
type Leaf ¶
type Leaf struct{ Value int64 }
func LeafFromJSON ¶
func (*Leaf) AcceptTree ¶
func (r *Leaf) AcceptTree(v TreeVisitor) any
func (*Leaf) MarshalJSON ¶
func (*Leaf) UnmarshalJSON ¶
type N0 ¶
type N0 struct{}
func N0FromJSON ¶
func (*N0) AcceptNumber ¶
func (r *N0) AcceptNumber(v NumberVisitor) any
func (*N0) MarshalJSON ¶
func (*N0) UnmarshalJSON ¶
type N1 ¶
type N1 struct{}
func N1FromJSON ¶
func (*N1) AcceptNumber ¶
func (r *N1) AcceptNumber(v NumberVisitor) any
func (*N1) MarshalJSON ¶
func (*N1) UnmarshalJSON ¶
type NumberUnionJSON ¶
type NumberUnionJSON struct { Type string `json:"$type,omitempty"` N0 json.RawMessage `json:"testutils.N0,omitempty"` N1 json.RawMessage `json:"testutils.N1,omitempty"` }
mkunion-extension:json
type P ¶ added in v1.20.2
func (*P) AcceptTree ¶ added in v1.20.2
func (r *P) AcceptTree(v TreeVisitor) any
type TreeUnionJSON ¶
type TreeUnionJSON struct { Type string `json:"$type,omitempty"` Branch json.RawMessage `json:"testutils.Branch,omitempty"` Leaf json.RawMessage `json:"testutils.Leaf,omitempty"` K json.RawMessage `json:"testutils.K,omitempty"` P json.RawMessage `json:"testutils.P,omitempty"` }
mkunion-extension:json
Click to show internal directories.
Click to hide internal directories.