extent

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(s Span) string

func Overlaps

func Overlaps(a, b Span) bool

Types

type Generic

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

func NewGeneric

func NewGeneric(lower, upper zed.Value, cmp expr.CompareFn) *Generic

Create a new Range from generic range of zed.Values according to lower and upper. The range is not sensitive to the absolute order of lower and upper.

func NewGenericFromOrder

func NewGenericFromOrder(first, last zed.Value, o order.Which) *Generic

func (*Generic) After

func (g *Generic) After(val *zed.Value) bool

func (*Generic) Before

func (g *Generic) Before(val *zed.Value) bool

func (*Generic) Crop

func (g *Generic) Crop(s Span) bool

func (*Generic) Extend

func (g *Generic) Extend(val *zed.Value)

func (*Generic) First

func (g *Generic) First() *zed.Value

func (*Generic) In

func (g *Generic) In(val *zed.Value) bool

func (*Generic) Last

func (g *Generic) Last() *zed.Value

func (*Generic) Overlaps

func (g *Generic) Overlaps(first, last *zed.Value) bool

func (*Generic) String

func (g *Generic) String() string

type Span

type Span interface {
	First() *zed.Value
	Last() *zed.Value
	Before(*zed.Value) bool
	After(*zed.Value) bool
	In(*zed.Value) bool
	Overlaps(*zed.Value, *zed.Value) bool
	Crop(Span) bool
	Extend(*zed.Value)
	String() string
}

Span represents the closed interval [first, last] where first is "less than" last with respect to the Span's order.Which.

Jump to

Keyboard shortcuts

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