Skip to main content

read_tail

Function read_tail 

Source
pub fn read_tail<T: TailCodec>(
    data: &[u8],
    body_end: usize,
) -> Result<T, ProgramError>
Expand description

Decode the tail as T: TailCodec, checking that the encoded length exactly matches the u32 prefix. Extra bytes beyond T’s decode are a malformed-encoding signal.