match

package
v1.2.76 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	/** Do all elements match the predicate? */
	KindAny = Kind{true, true}
	/** Do any elements match the predicate? */
	KindAll = Kind{false, false}
	/** Do no elements match the predicate? */
	KindNone = Kind{true, false}
)

Functions

This section is empty.

Types

type Kind

type Kind struct {
	StopOnPredicateMatches bool
	ShortCircuitResult     bool
}

*

  • Enum describing quantified match options -- all match, any match, none
  • match.

type MatchOp

type MatchOp struct {
	terminal.TODOOperation
	// contains filtered or unexported fields
}

func NewMatchOp

func NewMatchOp(matchKind Kind, sinkNewer func() *MatchSink) *MatchOp

func NewMatchOp2

func NewMatchOp2(matchKind Kind, predicate predicate.Predicater) *MatchOp

func (MatchOp) EvaluateParallel

func (op MatchOp) EvaluateParallel(ctx context.Context, spliterator spliterator.Spliterator) optional.Optional

func (MatchOp) EvaluateSequential

func (op MatchOp) EvaluateSequential(ctx context.Context, spliterator spliterator.Spliterator) optional.Optional

func (MatchOp) MakeSink

func (op MatchOp) MakeSink() *MatchSink

type MatchSink

type MatchSink struct {
	// contains filtered or unexported fields
}

func NewMatchSink

func NewMatchSink(matchKind Kind, predicate predicate.Predicater) *MatchSink

func (*MatchSink) Accept

func (sink *MatchSink) Accept(value interface{})

func (*MatchSink) AcceptMatchKind

func (sink *MatchSink) AcceptMatchKind(matchKind Kind)

func (*MatchSink) CancellationRequested

func (sink *MatchSink) CancellationRequested() bool

func (*MatchSink) GetAndClearState

func (sink *MatchSink) GetAndClearState() bool

type MatchTask

type MatchTask struct {
	terminal.TODOShortCircuitTask
	// contains filtered or unexported fields
}

func NewMatchTask

func NewMatchTask(op MatchOp, spliterator spliterator.Spliterator) *MatchTask

func NewTaskFromParent

func NewTaskFromParent(parent MatchTask, spliterator spliterator.Spliterator) *MatchTask

func (MatchTask) DoLeaf

func (task MatchTask) DoLeaf(ctx context.Context) terminal.Sink

func (MatchTask) MakeChild

func (task MatchTask) MakeChild(spliterator spliterator.Spliterator) terminal.Task

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL