Versions in this module Expand all Collapse all v1 v1.24.0 Jan 8, 2024 Changes in this version + type Leaf2 = Leaf + type ListOfAliasAny = ListOf[any] + type Tree2 = Branch v1.23.0 Jan 6, 2024 v1.22.0 Jan 4, 2024 Changes in this version type Branch + IntPtr *int64 v1.21.1 Jan 3, 2024 v1.21.0 Jan 3, 2024 Changes in this version + func KaShape() shape.Shape + func KaToJSON(x *Ka) ([]byte, error) + func LaShape() shape.Shape + func LaToJSON(x *La) ([]byte, error) + func MaShape() shape.Shape + func MaToJSON(x *Ma) ([]byte, error) type Branch + Kattr [2]*Leaf + L *Leaf + Of *ListOf[Tree] + type Ka []map[string]Tree + func KaFromJSON(x []byte) (*Ka, error) + func (r *Ka) AcceptTree(v TreeVisitor) any + func (r *Ka) MarshalJSON() ([]byte, error) + func (r *Ka) UnmarshalJSON(data []byte) error + type La []Tree + func LaFromJSON(x []byte) (*La, error) + func (r *La) AcceptTree(v TreeVisitor) any + func (r *La) MarshalJSON() ([]byte, error) + func (r *La) UnmarshalJSON(data []byte) error type ListOf + Data T type ListOf2 + Data T1 + ID string + List []T2 + ListOf ListOf[T1] + ListOfPtr *ListOf[T2] + Map map[T1]T2 + Time time.Time + Value schema.Schema + type Ma map[string]Tree + func MaFromJSON(x []byte) (*Ma, error) + func (r *Ma) AcceptTree(v TreeVisitor) any + func (r *Ma) MarshalJSON() ([]byte, error) + func (r *Ma) UnmarshalJSON(data []byte) error type P + func (r *P) MarshalJSON() ([]byte, error) + func (r *P) UnmarshalJSON(data []byte) error type TreeUnionJSON + Ka json.RawMessage + La json.RawMessage + Ma json.RawMessage type TreeVisitor + VisitKa func(v *Ka) any + VisitLa func(v *La) any + VisitMa func(v *Ma) any v1.20.2 Dec 15, 2023 Changes in this version + func PShape() shape.Shape + func PToJSON(x *P) ([]byte, error) + type ListOf struct + type ListOf2 struct + type P ListOf2[ListOf[any], *ListOf2[int64, *time.Duration]] + func PFromJSON(x []byte) (*P, error) + func (r *P) AcceptTree(v TreeVisitor) any type TreeUnionJSON + P json.RawMessage type TreeVisitor + VisitP func(v *P) any v1.20.1 Dec 12, 2023 v1.20.0 Dec 10, 2023 Changes in this version + 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 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 MatchAlphabet[TOut any](x Alphabet, f1 func(x *A1) TOut, f2 func(x *B2) TOut, f3 func(x *C3) TOut, ...) TOut + func MatchNumberR2[TOut1, TOut2 any](x Number, f1 func(x *N0) (TOut1, TOut2), f2 func(x *N1) (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 MatchTreeR2[TOut1, TOut2 any](x Tree, f1 func(x *Branch) (TOut1, TOut2), f2 func(x *Leaf) (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 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 MustMatchAlphabet[TOut any](x Alphabet, f1 func(x *A1) TOut, f2 func(x *B2) TOut, f3 func(x *C3) 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 MustMatchNumber[TOut any](x Number, f1 func(x *N0) TOut, f2 func(x *N1) TOut) TOut + func MustMatchTreeR0(x Tree, f1 func(x *Branch), f2 func(x *Leaf), f3 func(x *K)) + func MustMatchTreeR2[TOut1, TOut2 any](x Tree, f1 func(x *Branch) (TOut1, TOut2), f2 func(x *Leaf) (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 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 ReduceTreeBreadthFirst[A any](r TreeReducer[A], v Tree, init A) A + func ReduceTreeDepthFirst[A any](r TreeReducer[A], v Tree, init A) A + func TreeSchemaDef() *schema.UnionVariants[Tree] + func TreeShape() shape.Shape + func TreeToJSON(x Tree) ([]byte, error) + type A1 struct + func A1FromJSON(x []byte) (*A1, error) + func (r *A1) AcceptAlphabet(v AlphabetVisitor) any + func (self *A1) MarshalJSON() ([]byte, error) + func (self *A1) UnmarshalJSON(x []byte) error + type Alphabet interface + AcceptAlphabet func(g AlphabetVisitor) any + func AlphabetFromJSON(x []byte) (Alphabet, error) + type AlphabetUnionJSON struct + A1 json.RawMessage + B2 json.RawMessage + C3 json.RawMessage + Type string + type AlphabetVisitor interface + VisitA1 func(v *A1) any + VisitB2 func(v *B2) any + VisitC3 func(v *C3) any + type B2 struct + func B2FromJSON(x []byte) (*B2, error) + func (r *B2) AcceptAlphabet(v AlphabetVisitor) any + func (self *B2) MarshalJSON() ([]byte, error) + func (self *B2) UnmarshalJSON(x []byte) error + type Branch struct + List []Tree + Lit Tree + Map map[string]Tree + func BranchFromJSON(x []byte) (*Branch, error) + func (r *Branch) AcceptTree(v TreeVisitor) any + func (self *Branch) MarshalJSON() ([]byte, error) + func (self *Branch) UnmarshalJSON(x []byte) error + type C3 struct + func C3FromJSON(x []byte) (*C3, error) + func (r *C3) AcceptAlphabet(v AlphabetVisitor) any + func (self *C3) MarshalJSON() ([]byte, error) + func (self *C3) UnmarshalJSON(x []byte) error + type K string + func KFromJSON(x []byte) (*K, error) + func (r *K) AcceptTree(v TreeVisitor) any + func (self *K) MarshalJSON() ([]byte, error) + func (self *K) UnmarshalJSON(x []byte) error + type Leaf struct + Value int + func LeafFromJSON(x []byte) (*Leaf, error) + func (r *Leaf) AcceptTree(v TreeVisitor) any + func (self *Leaf) MarshalJSON() ([]byte, error) + func (self *Leaf) UnmarshalJSON(x []byte) error + type MatchAlphabetNumberTuple interface + Match1 func(x *A1, y *N0) + Match2 func(x *C3, y any) + Match3 func(x, y any) + type N0 struct + func N0FromJSON(x []byte) (*N0, error) + func (r *N0) AcceptNumber(v NumberVisitor) any + func (self *N0) MarshalJSON() ([]byte, error) + func (self *N0) UnmarshalJSON(x []byte) error + type N1 struct + func N1FromJSON(x []byte) (*N1, error) + func (r *N1) AcceptNumber(v NumberVisitor) any + func (self *N1) MarshalJSON() ([]byte, error) + func (self *N1) UnmarshalJSON(x []byte) error + type Number interface + AcceptNumber func(g NumberVisitor) any + func NumberFromJSON(x []byte) (Number, error) + type NumberUnionJSON struct + N0 json.RawMessage + N1 json.RawMessage + Type string + type NumberVisitor interface + VisitN0 func(v *N0) any + VisitN1 func(v *N1) any + type Tree interface + AcceptTree func(g TreeVisitor) any + func TreeFromJSON(x []byte) (Tree, error) + type TreeBreadthFirstVisitor struct + func (d *TreeBreadthFirstVisitor[A]) VisitBranch(v *Branch) any + func (d *TreeBreadthFirstVisitor[A]) VisitK(v *K) any + func (d *TreeBreadthFirstVisitor[A]) VisitLeaf(v *Leaf) any + type TreeDefaultReduction struct + DefaultStopReduction bool + OnBranch func(x *Branch, agg A) (result A, stop bool) + OnK func(x *K, agg A) (result A, stop bool) + OnLeaf func(x *Leaf, agg A) (result A, stop bool) + PanicOnFallback bool + func (t *TreeDefaultReduction[A]) ReduceBranch(x *Branch, agg A) (result A, stop bool) + func (t *TreeDefaultReduction[A]) ReduceK(x *K, agg A) (result A, stop bool) + func (t *TreeDefaultReduction[A]) ReduceLeaf(x *Leaf, agg A) (result A, stop bool) + type TreeDefaultVisitor struct + Default A + OnBranch func(x *Branch) A + OnK func(x *K) A + OnLeaf func(x *Leaf) A + func (t *TreeDefaultVisitor[A]) VisitBranch(v *Branch) any + func (t *TreeDefaultVisitor[A]) VisitK(v *K) any + func (t *TreeDefaultVisitor[A]) VisitLeaf(v *Leaf) any + type TreeDepthFirstVisitor struct + func (d *TreeDepthFirstVisitor[A]) VisitBranch(v *Branch) any + func (d *TreeDepthFirstVisitor[A]) VisitK(v *K) any + func (d *TreeDepthFirstVisitor[A]) VisitLeaf(v *Leaf) any + type TreeReducer interface + ReduceBranch func(x *Branch, agg A) (result A, stop bool) + ReduceK func(x *K, agg A) (result A, stop bool) + ReduceLeaf func(x *Leaf, agg A) (result A, stop bool) + type TreeUnionJSON struct + Branch json.RawMessage + K json.RawMessage + Leaf json.RawMessage + Type string + type TreeVisitor interface + VisitBranch func(v *Branch) any + VisitK func(v *K) any + VisitLeaf func(v *Leaf) any