// Code generated by "enumer -type=errorKind -output errors_gen.go"; DO NOT EDIT.

package streams

import (
	"fmt"
)

const _errorKindName = "TypeErrorRangeErrorRuntimeErrorAssertionErrorNotSupportedError"

var _errorKindIndex = [...]uint8{0, 9, 19, 31, 45, 62}

func (i errorKind) String() string {
	i -= 1
	if i >= errorKind(len(_errorKindIndex)-1) {
		return fmt.Sprintf("errorKind(%d)", i+1)
	}
	return _errorKindName[_errorKindIndex[i]:_errorKindIndex[i+1]]
}

var _errorKindValues = []errorKind{1, 2, 3, 4, 5}

var _errorKindNameToValueMap = map[string]errorKind{
	_errorKindName[0:9]:   1,
	_errorKindName[9:19]:  2,
	_errorKindName[19:31]: 3,
	_errorKindName[31:45]: 4,
	_errorKindName[45:62]: 5,
}

// errorKindString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func errorKindString(s string) (errorKind, error) {
	if val, ok := _errorKindNameToValueMap[s]; ok {
		return val, nil
	}
	return 0, fmt.Errorf("%s does not belong to errorKind values", s)
}

// errorKindValues returns all values of the enum
func errorKindValues() []errorKind {
	return _errorKindValues
}

// IsAerrorKind returns "true" if the value is listed in the enum definition. "false" otherwise
func (i errorKind) IsAerrorKind() bool {
	for _, v := range _errorKindValues {
		if i == v {
			return true
		}
	}
	return false
}
