Skip to main content

serve_site_with

Function serve_site_with 

Source
pub fn serve_site_with<T: ServeTransport>(
    site_dir: &Path,
    transport: &T,
) -> Result<()>
Expand description

Starts the dev server using a caller-supplied transport.

Extracted so test code can pass a no-op transport and still exercise the surrounding glue (path validation, address formatting). Production callers use serve_site which delegates to HttpTransport.

ยงErrors

Returns an error if site_dir contains invalid UTF-8 or if the underlying transport fails.