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::*;§Related
crate::runtimefor runtime flows that consume media helpers. Reads a bounded media asset for direct native response handling.
§Parameters
artifact_dir: Input consumed bycrate::dynamic_media_serve_asset.path: Input consumed bycrate::dynamic_media_serve_asset.
§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"));§Related
- [
crate] for adjacent helpers that share the same runtime surface.