Skip to main content

CompressFn

Type Alias CompressFn 

Source
pub type CompressFn = fn(Value, usize) -> (Vec<u8>, usize, usize);
Expand description

Receives the already-parsed JSON value, avoiding a redundant serde_json::from_slice on every request. Returns the serialized (possibly compressed) body, original size, and compressed size.