You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the enum variant of ErrorKind UnexpectedEnd is void. I suggest changing it to UnexpectedEnd(usize) so the caller will be able to know how much data it is missing for success.
This will allow development of stream protocols to be more efficient by reserving buffers & calling the decode only when data is complete.
More specifically, I'm now developing a actix-codecEncoder/Decoder and I'd wish to reserve the additional missing data before returning.
Thoughts?
The text was updated successfully, but these errors were encountered:
Because bincode does not have a look ahead system, if you feed this struct only 1 byte, it would report a UnexpectedEnd(7) as u64 needs 8 bytes. Not the 15 bytes it actually needs. Would this be good enough for your case?
Right now the enum variant of ErrorKind
UnexpectedEnd
is void. I suggest changing it toUnexpectedEnd(usize)
so the caller will be able to know how much data it is missing for success.This will allow development of stream protocols to be more efficient by reserving buffers & calling the decode only when data is complete.
More specifically, I'm now developing a
actix-codec
Encoder
/Decoder
and I'd wish to reserve the additional missing data before returning.Thoughts?
The text was updated successfully, but these errors were encountered: