DenoRtNativeAddonLoader

Trait DenoRtNativeAddonLoader 

Source
pub trait DenoRtNativeAddonLoader: Send + Sync {
    // Required method
    fn load_if_in_vfs(&self, path: &Path) -> Option<Cow<'static, [u8]>>;

    // Provided method
    fn load_and_resolve_path<'a>(
        &self,
        path: &'a Path,
    ) -> Result<Cow<'a, Path>, LoadError> { ... }
}
Expand description

Loads native addons in deno compile.

The implementation should provide the bytes from the binary of the native file.

Required Methods§

Source

fn load_if_in_vfs(&self, path: &Path) -> Option<Cow<'static, [u8]>>

Provided Methods§

Source

fn load_and_resolve_path<'a>( &self, path: &'a Path, ) -> Result<Cow<'a, Path>, LoadError>

Implementors§