Asset

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset[V int64 | uint64] map[AssetName.AssetName]V

func (Asset[V]) Add

func (ma Asset[V]) Add(other Asset[V]) Asset[V]

*

Add adds another Asset map to the current Asset map.

Params:
	other (Asset[V]): The Asset map to add to the current Asset map.

Returns:
	Asset[V]: The resulting Asset map after addition.

func (Asset[V]) Clone

func (ma Asset[V]) Clone() Asset[V]

*

Clone creates a deep copy of an Asset map.

Returns:
	Asset[V]: A deep copy of the original Asset map.

func (Asset[V]) Equal

func (ma Asset[V]) Equal(other Asset[V]) bool

*

Equal checks if two Asset maps are equal using
the function DeepEuqal from the package "reflect".

Parameters:
	other (Asset[V]): The other Asset map to compare to.

Returns:
  	bool: true if the two Asset maps are equal, false otherwise.

func (Asset[V]) Greater

func (ma Asset[V]) Greater(other Asset[V]) bool

*

Greater function checks if the current Asset map is greater than
another Asset map.

Parameters:
	other (Asset[V]): The other Asset map to compare to.

Returns:
  	bool: true if the current Asset map is greater than the other, false otherwise.

func (Asset[V]) Inverted

func (ma Asset[V]) Inverted() Asset[V]

*

Inverted creates a copy of an Asset map containing opposite amounts
of the original one.

Returns:
	Asset[V]: An inverted copy of the original Asset map.

func (Asset[V]) Less

func (ma Asset[V]) Less(other Asset[V]) bool

*

Less function checks if the current Asset map is less than
another Asset map.

Parameters:
	other (Asset[V]): The other Asset map to compare to.

Returns:
  	bool: true if the current Asset map is less than the other, false otherwise.

func (Asset[V]) Sub

func (ma Asset[V]) Sub(other Asset[V]) Asset[V]

*

Sub subtracts another Asset map from the current Asset map.

Params:
	other (Asset[V]): The Asset map to subtract from the current Asset map.

Returns:
	Asset[V]: The resulting Asset map after subtraction.

Jump to

Keyboard shortcuts

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