pub fn expect_end(
data: &[u8],
end: usize,
at: usize,
what: &str,
) -> Result<(), Error>Expand description
Require a value that stopped at end to have used all of data.
Octets left over are DecodingKind::Trailing, arguments past the
value’s last member, unless they open with a closing tag, which closes
nothing, or with a tag header that doesn’t decode: those are
DecodingKind::InvalidTag.
at is the offset the error reports: end itself when data is the
whole input, or the frame’s own offset in the larger input when data is
a frame body sliced out of it (offsets into the slice would mislead).