Closed
Description
slice_from_prefix
returnsOption<(&[Self], &[u8])>
slice_from_suffix
returnsOption<(&[u8], &[Self])>
mut_slice_from_prefix
returnsOption<(&mut [Self], &mut [u8])>
mut_slice_from_suffix
returnsOption<(&mut [u8], &mut [Self])>
However, all of the other methods drop the prefix/suffix:
FromBytes::read_from_prefix
returnsOption<Self>
FromBytes::read_from_suffix
returnsOption<Self>
FromBytes::ref_from_prefix
returnsOption<&Self>
FromBytes::ref_from_suffix
returnsOption<&Self>
FromBytes::mut_from_prefix
returnsOption<&mut Self>
FromBytes::mut_from_suffix
returnsOption<&mut Self>
This is desirable: the majority of the time I drop the prefix anyways and these are convenience methods for methods in Ref
.
[ref|mut]_from_[prefix|suffix]
in their docs both point to using Ref
to preserve the prefix/suffix.