Menu

Function

resource_handler_from_bytes

kurogane::resource_handler_from_bytesSource
pub fn resource_handler_from_bytes( data: Vec<u8>, mime: &str, status: i32, ) -> ResourceHandler

Builds a ResourceHandler serving data once with the given MIME type and status code.

For custom scheme handlers that answer with static bytes. The bytes exist before SchemeHandler::create returns on the IO thread. Producing them must be cheap.