clone method

  1. @override
MsgPackDecoder clone()
override

Creates a new Decoder that is a copy of this one.

This is useful when a Decodable implementation needs to decode data without consuming the original data. For example when checking if a key exists or decoding a value conditionally.

Implementation

@override
MsgPackDecoder clone() {
  return MsgPackDecoder._(Unpacker.copy(_unpacker._list, _unpacker._d, _unpacker._offset));
}