Skip to main content

tail_capacity

Function tail_capacity 

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

Return the account bytes available after the tail length prefix.

This is useful before a grow/realloc path: if the encoded payload to write is larger than this value, the caller must resize the account before calling write_tail.