Documentation ¶
Index ¶
- type HigherThanError
- type LowerThanError
- type MaxReachedError
- type MinNotReachedError
- type Option
- func HigherThan[N constraints.Integer | constraints.Float](Limit N) Option[N]
- func LowerThan[N constraints.Integer | constraints.Float](Limit N) Option[N]
- func Max[T any](len uint64) Option[[]T]
- func MaxChar(len uint64) Option[string]
- func Min[T any](Min uint64) Option[[]T]
- func MinChars(Min uint64) Option[string]
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HigherThanError ¶
type HigherThanError[N constraints.Integer | constraints.Float] struct { // contains filtered or unexported fields }
func ValueHigherThan ¶
func ValueHigherThan[N constraints.Integer | constraints.Float](value N, limit N) HigherThanError[N]
func (HigherThanError[N]) Limit ¶
func (err HigherThanError[N]) Limit() N
type LowerThanError ¶
type LowerThanError[N constraints.Integer | constraints.Float] struct { // contains filtered or unexported fields }
func ValueLowerThan ¶
func ValueLowerThan[N constraints.Integer | constraints.Float](value N, limit N) LowerThanError[N]
func (LowerThanError[N]) Limit ¶
func (err LowerThanError[N]) Limit() N
type MaxReachedError ¶
type MaxReachedError struct {
// contains filtered or unexported fields
}
func MaxReached ¶
func MaxReached(max uint64, value any) MaxReachedError
func (MaxReachedError) Max ¶
func (err MaxReachedError) Max() uint64
type MinNotReachedError ¶
type MinNotReachedError struct {
// contains filtered or unexported fields
}
func MinNotReached ¶
func MinNotReached(min uint64, value any) MinNotReachedError
func (MinNotReachedError) Min ¶
func (err MinNotReachedError) Min() uint64
type Option ¶
type Option[T any] interface { // contains filtered or unexported methods }
func HigherThan ¶
func HigherThan[N constraints.Integer | constraints.Float](Limit N) Option[N]
func LowerThan ¶
func LowerThan[N constraints.Integer | constraints.Float](Limit N) Option[N]
Click to show internal directories.
Click to hide internal directories.