// Code generated by godown. Extracted from go1.26.5 reflect. DO NOT EDIT.

package reflect

import (
	"iter"
	"reflect"
)

func ValueFields(v reflect.Value) iter.Seq2[reflect.StructField, reflect.Value] {
	t := v.Type()
	if t.Kind() != reflect.Struct {
		panic("reflect: Fields of non-struct type " + t.String())
	}
	return func(yield func(reflect.StructField, reflect.Value) bool) {
		for i := range v.NumField() {
			if !yield(t.Field(i), v.Field(i)) {
				return
			}
		}
	}
}
