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
root: Input consumed bycrate::artifact_server::serve_streamable_asset.method: Input consumed bycrate::artifact_server::serve_streamable_asset.target: Input consumed bycrate::artifact_server::serve_streamable_asset.range: Input consumed bycrate::artifact_server::serve_streamable_asset.if_range: Input consumed bycrate::artifact_server::serve_streamable_asset.
§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!());§Related
crate::artifact_serverfor adjacent helpers that share the same runtime surface.