Skip to main content

dynamic_media_serve_asset

Function dynamic_media_serve_asset 

pub fn dynamic_media_serve_asset(
    artifact_dir: &Path,
    path: &str,
) -> Result<Vec<u8>, MediaError>
Expand description

Re-exports the media runtime helpers when the media feature is enabled.

§Examples

ⓘ
use pharos_native::media::*;
  • crate::runtime for runtime flows that consume media helpers. Reads a bounded media asset for direct native response handling.

§Parameters

§Returns

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

§Errors

Returns an error value when crate::dynamic_media_serve_asset cannot complete successfully.

§Performance

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

§Examples

ⓘ
let _result = pharos_runtime_media::dynamic_media_serve_asset(std::path::Path::new("build/dev_docs"), std::path::Path::new("fixture.json"));
  • [crate] for adjacent helpers that share the same runtime surface.