Documentation ¶
Overview ¶
Code below generated from scalar_gen.go.tmpl
Index ¶
- Variables
- type BoolToDescription
- type BoolToScalar
- type BoolToSymBool
- type BoolToSymF
- type BoolToSymS
- type BoolToSymStr
- type BoolToSymU
- type BytesToScalar
- type DisplayFormat
- type Fn
- type Mapper
- type S
- func (s S) ActualBigInt() *big.Int
- func (s S) ActualBitBuf() bitio.ReaderAtSeeker
- func (s S) ActualBool() bool
- func (s S) ActualF() float64
- func (s S) ActualS() int64
- func (s S) ActualStr() string
- func (s S) ActualU() uint64
- func (s S) SymBigInt() *big.Int
- func (s S) SymBitBuf() bitio.ReaderAtSeeker
- func (s S) SymBool() bool
- func (s S) SymF() float64
- func (s S) SymS() int64
- func (s S) SymStr() string
- func (s S) SymU() uint64
- func (s S) Value() interface{}
- type SRangeEntry
- type SRangeToScalar
- type SToDescription
- type SToScalar
- type SToSymBool
- type SToSymF
- type SToSymS
- type SToSymStr
- type SToSymU
- type StrToDescription
- type StrToScalar
- type StrToSymBool
- type StrToSymF
- type StrToSymS
- type StrToSymStr
- type StrToSymU
- type URangeEntry
- type URangeToScalar
- type UToDescription
- type UToScalar
- type UToSymBool
- type UToSymF
- type UToSymS
- type UToSymStr
- type UToSymU
Constants ¶
This section is empty.
Variables ¶
var Bin = Fn(func(s S) (S, error) { s.ActualDisplay = NumberBinary; return s, nil })
var Dec = Fn(func(s S) (S, error) { s.ActualDisplay = NumberDecimal; return s, nil })
var Oct = Fn(func(s S) (S, error) { s.ActualDisplay = NumberOctal; return s, nil })
var RawHex = Fn(func(s S) (S, error) { return rawSym(s, -1, func(b []byte) string { return fmt.Sprintf("%x", b) }) })
var RawUUID = Fn(func(s S) (S, error) { return rawSym(s, -1, func(b []byte) string { return fmt.Sprintf("%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:]) }) })
var SymBin = Fn(func(s S) (S, error) { s.SymDisplay = NumberBinary; return s, nil })
var SymDec = Fn(func(s S) (S, error) { s.SymDisplay = NumberDecimal; return s, nil })
var SymOct = Fn(func(s S) (S, error) { s.SymDisplay = NumberOctal; return s, nil })
Functions ¶
This section is empty.
Types ¶
type BoolToDescription ¶ added in v0.0.7
Map Bool -> Scalar description
type BoolToScalar ¶
Map Bool -> Scalar
type BoolToSymBool ¶
Map Bool -> Sym Bool
type BoolToSymF ¶
Map Bool -> Sym F
type BoolToSymS ¶
Map Bool -> Sym S
type BoolToSymStr ¶
Map Bool -> Sym Str
type BoolToSymU ¶
Map Bool -> Sym U
type BytesToScalar ¶
type DisplayFormat ¶
type DisplayFormat int
const ( NumberDecimal DisplayFormat = iota NumberBinary NumberOctal NumberHex )
func (DisplayFormat) FormatBase ¶
func (df DisplayFormat) FormatBase() int
type Mapper ¶
func Description ¶
func StrIntToSym ¶ added in v0.0.5
func StrUintToSym ¶ added in v0.0.5
type S ¶
type S struct { Actual interface{} // nil, int, int64, uint64, float64, string, bool, []byte, *bit.Int, bitio.BitReaderAtSeeker, ActualDisplay DisplayFormat Sym interface{} SymDisplay DisplayFormat Description string Unknown bool }
func (S) ActualBigInt ¶ added in v0.0.4
ActualBigInt asserts actual value is a BigInt and returns it
func (S) ActualBitBuf ¶
func (s S) ActualBitBuf() bitio.ReaderAtSeeker
ActualBitBuf asserts actual value is a BitBuf and returns it
func (S) ActualBool ¶
ActualBool asserts actual value is a Bool and returns it
func (S) SymBitBuf ¶
func (s S) SymBitBuf() bitio.ReaderAtSeeker
SymBitBuf asserts symbolic value is a BitBuf and returns it
type SRangeEntry ¶ added in v0.0.3
SRangeToScalar maps ranges to a scalar, first in range is chosen
type SRangeToScalar ¶
type SRangeToScalar []SRangeEntry
SRangeToScalar maps sint64 ranges to a scalar, first in range is chosen
type SToDescription ¶ added in v0.0.7
Map S -> Scalar description
type SToSymBool ¶
Map S -> Sym Bool
type StrToDescription ¶ added in v0.0.7
Map Str -> Scalar description
type StrToScalar ¶
Map Str -> Scalar
type StrToSymBool ¶
Map Str -> Sym Bool
type StrToSymStr ¶
Map Str -> Sym Str
type URangeEntry ¶ added in v0.0.3
type URangeToScalar ¶
type URangeToScalar []URangeEntry
URangeToScalar maps uint64 ranges to a scalar, first in range is chosen
type UToDescription ¶ added in v0.0.7
Map U -> Scalar description
type UToSymBool ¶
Map U -> Sym Bool