Skip to main content

encode_header_pooled

Function encode_header_pooled 

Source
pub fn encode_header_pooled(header: &Header) -> [u8; 11]
Expand description

Encode a header using the thread-local pool.

This returns a copy of the encoded header since we can’t safely return a reference to thread-local data across await points.

For most use cases, prefer Header::encode() directly since it also returns a stack-allocated array with no heap allocation.