Skip to main content

serve_streamable_asset

Function serve_streamable_asset 

Source
pub fn serve_streamable_asset(
    root: &Path,
    method: &str,
    target: &str,
    range: Option<&str>,
    if_range: Option<&str>,
) -> Result<Option<StreamResponse>, StreamError>
Expand description

Resolves a public static/media request into a bounded streaming plan.

§Parameters

§Returns

Returns the successful value produced by crate::artifact_server::serve_streamable_asset or an error when the operation fails.

§Errors

Returns an error value when crate::artifact_server::serve_streamable_asset cannot complete successfully.

§Examples

ⓘ
let _result = pharos_runtime_static::artifact_server::serve_streamable_asset(std::path::Path::new("."), todo!(), "/", todo!(), todo!());