Function serve_file

Source
pub fn serve_file<D: Directory + ?Sized>(
    root: Arc<D>,
    path: Path,
    flags: Flags,
) -> FileProxy
Expand description

Helper function to serve a new connection to the file at path under root with flags. Errors will be communicated via epitaph on the returned proxy. A new ExecutionScope will be created for the request.

To serve an object that implements crate::file::File, use crate::file::serve.