Skip to main content

slice_range

Function slice_range 

Source
pub fn slice_range(body: &[u8], range: ByteRange) -> &[u8] 
Expand description

Slice a body buffer to a byte range. The slice is a zero-copy view; callers are expected to copy_from_slice or similar when returning it through an HTTP framework.