types

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SortableSlice

type SortableSlice[T ~[]E, E constraints.Ordered] struct {
	Items T
	Desc  bool
}

func (SortableSlice[T, E]) Len

func (s SortableSlice[T, E]) Len() int

func (SortableSlice[T, E]) Less

func (s SortableSlice[T, E]) Less(i, j int) bool

func (SortableSlice[T, E]) Swap

func (s SortableSlice[T, E]) Swap(i, j int)

type SortableStruct

type SortableStruct[E constraints.Ordered] struct {
	Value    E
	Attached any
}

type SortableStructs

type SortableStructs[T ~[]E, E constraints.Ordered] struct {
	Items []*SortableStruct[E]
	Desc  bool
}

func (SortableStructs[T, E]) Len

func (s SortableStructs[T, E]) Len() int

func (SortableStructs[T, E]) Less

func (s SortableStructs[T, E]) Less(i, j int) bool

func (SortableStructs[T, E]) Swap

func (s SortableStructs[T, E]) Swap(i, j int)

Jump to

Keyboard shortcuts

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