UnmarshalBinary de-serializes the given byte slice into ZSetValue instance It uses the MessagePack format for de-serialization Returns an error if the decoding of Key, Score, or Value fails.
(data []byte)
| 1204 | // It uses the MessagePack format for de-serialization |
| 1205 | // Returns an error if the decoding of Key, Score, or Value fails. |
| 1206 | func (p *ZSetValue) UnmarshalBinary(data []byte) (err error) { |
| 1207 | dec := encoding.NewMessagePackDecoder(data) |
| 1208 | if err = dec.Decode(&p.member); err != nil { |
| 1209 | return |
| 1210 | } |
| 1211 | if err = dec.Decode(&p.score); err != nil { |
| 1212 | return err |
| 1213 | } |
| 1214 | if err = dec.Decode(&p.value); err != nil { |
| 1215 | return |
| 1216 | } |
| 1217 | return |
| 1218 | } |
| 1219 | |
| 1220 | // MarshalBinary uses MessagePack as the encoding format to serialize |
| 1221 | // the ZSetValue object into a byte array. |
nothing calls this directly
no test coverage detected