readset

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wrapper

type Wrapper[T any] struct {
	// contains filtered or unexported fields
}

Wrapper is a wrapper around a Set that provides read-only access to it.

func From

func From[T any](set sets.Set[T]) Wrapper[T]

From creates a new Wrapper around the given Set.

func (Wrapper[T]) Clone

func (w Wrapper[T]) Clone() Wrapper[T]

Clone returns a shallow copy of the Set.

func (Wrapper[T]) Contains

func (w Wrapper[T]) Contains(value T) bool

Contains returns true if the Set contains the given value.

func (Wrapper[T]) Iterator

func (w Wrapper[T]) Iterator() iter.Iterator[T]

Iterator returns an iter.Iterator over the Set.

func (Wrapper[T]) Size

func (w Wrapper[T]) Size() int

Size returns the number of elements in the Set.

func (Wrapper[T]) Stream

func (w Wrapper[T]) Stream(yield func(T) bool)

Stream streams the elements of the Set.

Jump to

Keyboard shortcuts

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