units

package
v0.0.0-...-4d93234 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Code generated by copy paste; DO NOT EDIT.

Index

Constants

View Source
const EmptyAspectSet = AspectSet("0")
View Source
const InvalidAspectEnumValueString = "<invalid AspectE>"

Variables

View Source
var ErrEmptySet = eh.Errorf("encoding contains empty set")
View Source
var ErrInvalidEncoding = eh.Errorf("encoding is wrong")
View Source
var MaxAspectExcl = slices.Max(AllAspects) + 1

Functions

func CountEncodedAspects

func CountEncodedAspects(encoded AspectSet) (n int, err error)

func IterateAspects

func IterateAspects(encoded AspectSet) iter.Seq2[int, AspectE]

Types

type AspectE

type AspectE uint8
const (
	AspectNone AspectE = 0

	AspectDurationSI          AspectE = 1
	AspectLengthSI            AspectE = 2
	AspectMassSI              AspectE = 3
	AspectElectricCurrentSI   AspectE = 4
	AspectTemperatureSI       AspectE = 5
	AspectMoleSI              AspectE = 6
	AspectLuminousIntensitySI AspectE = 7

	AspectPlaneAngleSI          AspectE = 8
	AspectSolidAngleSI          AspectE = 9
	AspectFrequencySI           AspectE = 10
	AspectForceSI               AspectE = 11
	AspectPressureSI            AspectE = 12
	AspectEnergySI              AspectE = 13
	AspectPowerSI               AspectE = 14
	AspectElectricChargeSI      AspectE = 15
	AspectVoltageSI             AspectE = 16
	AspectCapacitanceSI         AspectE = 17
	AspectResistanceSI          AspectE = 18
	AspectConductanceSI         AspectE = 19
	AspectMagneticFluxSI        AspectE = 20
	AspectMagneticFluxDensitySI AspectE = 21
	AspectInductanceSI          AspectE = 22
	AspectTemperatureCelsiusSI  AspectE = 23
	AspectLuminousFluxSI        AspectE = 24
	AspectIlluminanceSI         AspectE = 25
	AspectRadioactiveActivitySI AspectE = 26
	AspectAbsorbedDoseSI        AspectE = 27
	AspectDoseEquivalentSI      AspectE = 28
	AspectCatalyticActivitySI   AspectE = 29

	AspectAccelerationSI      AspectE = 30
	AspectAreaSI              AspectE = 31
	AspectComputationSI       AspectE = 32
	AspectDataTransferBitsSI  AspectE = 33
	AspectDataTransferBytesSI AspectE = 34
	AspectConcentrationSI     AspectE = 35
	AspectFlowSI              AspectE = 36
	AspectRotationalSpeedSI   AspectE = 37
	AspectVelocitySI          AspectE = 38
	AspectVolumeSI            AspectE = 39
	AspectTorqueSI            AspectE = 40
)

func MaxEncodedAspect

func MaxEncodedAspect(encoded AspectSet) (aspect AspectE, err error)

func (AspectE) IsValid

func (inst AspectE) IsValid() bool

func (AspectE) String

func (inst AspectE) String() string

func (AspectE) Value

func (inst AspectE) Value() uint8

type AspectSet

type AspectSet string

func EncodeAspects

func EncodeAspects(aspects ...AspectE) (encoded AspectSet, err error)

func EncodeAspectsIgnoreInvalid

func EncodeAspectsIgnoreInvalid(aspects ...AspectE) (encoded AspectSet)

func EncodeAspectsMustValidate

func EncodeAspectsMustValidate(aspects ...AspectE) (encoded AspectSet)

func UnionAspects

func UnionAspects(asp1 AspectSet, asp2 AspectSet) (res AspectSet, err error)

func UnionAspectsIgnoreInvalid

func UnionAspectsIgnoreInvalid(asp1 AspectSet, asp2 AspectSet) (res AspectSet)

func (AspectSet) CountEncodedAspects

func (inst AspectSet) CountEncodedAspects() (n int, err error)

func (AspectSet) IsEmptySet

func (inst AspectSet) IsEmptySet() bool

func (AspectSet) IsValid

func (inst AspectSet) IsValid() bool

func (AspectSet) IterateAspects

func (inst AspectSet) IterateAspects() iter.Seq2[int, AspectE]

func (AspectSet) MaxEncodedAspect

func (inst AspectSet) MaxEncodedAspect() (aspect AspectE, err error)

func (AspectSet) String

func (inst AspectSet) String() string

func (AspectSet) UnionAspects

func (inst AspectSet) UnionAspects(asp2 AspectSet) (res AspectSet, err error)

func (AspectSet) UnionAspectsIgnoreInvalid

func (inst AspectSet) UnionAspectsIgnoreInvalid(asp2 AspectSet) (res AspectSet)

Jump to

Keyboard shortcuts

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