decimal/decimal_gen.go
2021-10-15 14:11:52 +08:00

35 lines
781 B
Go

package decimal
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
import (
"github.com/tinylib/msgp/msgp"
)
// MarshalMsg implements msgp.Marshaler
func (z Decimal) MarshalMsg(b []byte) (o []byte, err error) {
o = msgp.Require(b, z.Msgsize())
o = msgp.AppendFloat64(o, z.InexactFloat64())
return
}
// UnmarshalMsg implements msgp.Unmarshaler
func (z *Decimal) UnmarshalMsg(bts []byte) (o []byte, err error) {
{
var zb0001 float64
zb0001, bts, err = msgp.ReadFloat64Bytes(bts)
if err != nil {
err = msgp.WrapError(err)
return
}
(*z) = NewFromFloat(zb0001)
}
o = bts
return
}
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z Decimal) Msgsize() (s int) {
s = msgp.Float64Size
return
}