Input streams with large blocks of binary data should be decodable without copying their contents.
This is probably best done by making FromBencode take 'ser (the lifetime of the data being deserialized) as a parameter, thus we could have impls for &'ser [u8], Cow<'ser, [u8]>, and (possibly) &'ser str and Cow<'ser, str>
Input streams with large blocks of binary data should be decodable without copying their contents.
This is probably best done by making FromBencode take
'ser
(the lifetime of the data being deserialized) as a parameter, thus we could have impls for&'ser [u8]
,Cow<'ser, [u8]>
, and (possibly)&'ser str
andCow<'ser, str>