package limiter // Code generated by github.com/tinylib/msgp DO NOT EDIT. import ( "github.com/tinylib/msgp/msgp" ) // MarshalMsg implements msgp.Marshaler func (z item) MarshalMsg(b []byte) (o []byte, err error) { o = msgp.Require(b, z.Msgsize()) // map header, size 3 // string "currHits" o = append(o, 0x83, 0xa8, 0x63, 0x75, 0x72, 0x72, 0x48, 0x69, 0x74, 0x73) o = msgp.AppendInt(o, z.currHits) // string "prevHits" o = append(o, 0xa8, 0x70, 0x72, 0x65, 0x76, 0x48, 0x69, 0x74, 0x73) o = msgp.AppendInt(o, z.prevHits) // string "exp" o = append(o, 0xa3, 0x65, 0x78, 0x70) o = msgp.AppendUint64(o, z.exp) return } // UnmarshalMsg implements msgp.Unmarshaler func (z *item) UnmarshalMsg(bts []byte) (o []byte, err error) { var field []byte _ = field var zb0001 uint32 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) if err != nil { err = msgp.WrapError(err) return } for zb0001 > 0 { zb0001-- field, bts, err = msgp.ReadMapKeyZC(bts) if err != nil { err = msgp.WrapError(err) return } switch msgp.UnsafeString(field) { case "currHits": z.currHits, bts, err = msgp.ReadIntBytes(bts) if err != nil { err = msgp.WrapError(err, "currHits") return } case "prevHits": z.prevHits, bts, err = msgp.ReadIntBytes(bts) if err != nil { err = msgp.WrapError(err, "prevHits") return } case "exp": z.exp, bts, err = msgp.ReadUint64Bytes(bts) if err != nil { err = msgp.WrapError(err, "exp") return } default: bts, err = msgp.Skip(bts) if err != nil { err = msgp.WrapError(err) return } } } o = bts return } // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message func (z item) Msgsize() (s int) { s = 1 + 9 + msgp.IntSize + 9 + msgp.IntSize + 4 + msgp.Uint64Size return }