Skip to main content

encode_response_grid

Function encode_response_grid 

Source
pub fn encode_response_grid(
    grid: &HGrid,
    accept: &str,
) -> Result<(Vec<u8>, &'static str), CodecError>
Expand description

Encode an HGrid for the response using the best Accept type.

Returns (body_bytes, content_type). Text codecs produce UTF-8 bytes; HBF produces raw binary.