| 147 | // Takes a stream and multiple arguments and unserializes them first as a vector then each object individually in the order provided in the arguments |
| 148 | template<typename Stream, typename... X> |
| 149 | void UnserializeFromVector(Stream& s, X&... args) |
| 150 | { |
| 151 | size_t expected_size = ReadCompactSize(s); |
| 152 | if (!expected_size) { |
| 153 | return; /* Zero size = no data to read */ |
| 154 | } |
| 155 | size_t remaining_before = s.size(); |
| 156 | UnserializeMany(s, args...); |
| 157 | size_t remaining_after = s.size(); |
| 158 | if (remaining_after + expected_size != remaining_before) { |
| 159 | throw std::ios_base::failure("Size of value was not the stated size"); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | // Deserialize an individual HD keypath to a stream |
| 164 | template<typename Stream> |
no test coverage detected