Skip to main content

dispatch_response_file_for_request

Function dispatch_response_file_for_request 

Source
pub fn dispatch_response_file_for_request(
    root: &Path,
    method: &str,
    path: &str,
) -> Option<String>
Expand description

Serves a bounded route fixture file directly as response bytes.

§Parameters

§Returns

Returns Some when crate::runtime::dynamic::dispatch_response_file_for_request can produce a value and None otherwise.

§Performance

Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::runtime::dynamic::dispatch_response_file_for_request.

§Examples

ⓘ
let _result = pharos_native::runtime::dynamic::dispatch_response_file_for_request(std::path::Path::new("."), todo!(), std::path::Path::new("fixture.json"));