refactor implementation of Decode::encoded_fixed_size
refactor implementation of Decode::skip
By default, Input::skip does an actual read and discards the result, implementors should provide a specialized implementation.
By default, Decode::skip executes Input::skip for types providing Decode::encoded_fixed_size. Otherwise, it is just calling Decode::decode., so implementors should provide a specialized implementation.
As discussed in previous attempts that I found on github, Decode::skip shouldn't validate the input data, providing a fast forward functionality instead. IMHO if a calling code wants to check for data integrity they can manually do something like let _ = Decode::decode(input)?;
Input::skip
Decode::encoded_fixed_size
Decode::skip
By default,
Input::skip
does an actual read and discards the result, implementors should provide a specialized implementation.By default,
Decode::skip
executesInput::skip
for types providingDecode::encoded_fixed_size
. Otherwise, it is just callingDecode::decode
., so implementors should provide a specialized implementation.As discussed in previous attempts that I found on github,
Decode::skip
shouldn't validate the input data, providing a fast forward functionality instead. IMHO if a calling code wants to check for data integrity they can manually do something likelet _ = Decode::decode(input)?;
Closes #208 Closes #244