Skip to main content

serve_private_asset

Function serve_private_asset 

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

Resolves one already-authorized private asset key into a streaming plan.

§Parameters

§Returns

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

§Errors

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

§Performance

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

§Examples

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