Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comparable ¶
type Comparable interface { ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~float32 | ~float64 | ~string }
Comparable is an interface that defines the behavior of a type that can be compared with other values of the same type using the < and > operators. The interface is implemented by the built-in types int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, float32, float64, and string.
type Copier ¶
type Copier interface { // Copy creates a shallow copy of the object. // // Returns: // // - Copier: A shallow copy of the object. Copy() Copier }
Copier is an interface that provides a method to create a deep copy of an object.
type Equaler ¶
type Equaler[T any] interface { // Equals returns true if the object is equal to the other object. // // Parameters: // // - other: The other object to compare to. // // Returns: // // - bool: True if the object is equal to the other object. Equals(other T) bool }
Equaler is an interface that defines a method to compare two objects of the same type.
type Slicer ¶
type Slicer[T any] interface { // The Slice method returns a slice containing all the elements in the data structure. Slice() []T }
Slicer is an interface that defines a method to convert a data structure to a slice. It is implemented by data structures that can be converted to a slice of elements of the same type.