iterator

package
v0.106.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsIterator added in v0.95.0

func IsIterator(item stackitem.Item) bool

IsIterator returns whether stackitem implements iterator interface.

func Next added in v0.93.0

func Next(ic *interop.Context) error

Next advances the iterator, pushes true on success and false otherwise.

func Value added in v0.93.0

func Value(ic *interop.Context) error

Value returns current iterator value and depends on iterator type: For slices the result is just value. For maps the result is key-value pair packed in a struct.

func Values

func Values(item stackitem.Item, max int) []stackitem.Item

Values returns an array of up to `max` iterator values. The provided iterator can safely be reused to retrieve the rest of its values in the subsequent calls to Values and to ValuesTruncated.

func ValuesTruncated added in v0.99.1

func ValuesTruncated(item stackitem.Item, max int) ([]stackitem.Item, bool)

ValuesTruncated returns an array of up to `max` iterator values. The second return parameter denotes whether iterator is truncated, i.e. has more values. The provided iterator CAN NOT be reused in the subsequent calls to Values and to ValuesTruncated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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