pub struct FileSystemEmbedded { /* private fields */ }Expand description
Module resolution and loading functionality. File system implementation that uses embedded modules compiled into the binary.
This implementation stores all module contents in a compile-time perfect hash map, eliminating any runtime file system access. This is the basic secure option for module loading as it provides a completely closed set of available modules without filesystem access.
§Example
use hyperlight_js::embed_modules;
let fs = embed_modules! {
"math.js" => "../tests/fixtures/math.js",
"strings.js" => "../tests/fixtures/strings.js",
};
Implementations§
Trait Implementations§
Source§impl Clone for FileSystemEmbedded
impl Clone for FileSystemEmbedded
Source§fn clone(&self) -> FileSystemEmbedded
fn clone(&self) -> FileSystemEmbedded
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl FileSystem for FileSystemEmbedded
impl FileSystem for FileSystemEmbedded
fn new() -> Self
Source§fn symlink_metadata(&self, path: &Path) -> Result<FileMetadata>
fn symlink_metadata(&self, path: &Path) -> Result<FileMetadata>
impl Copy for FileSystemEmbedded
Auto Trait Implementations§
impl Freeze for FileSystemEmbedded
impl RefUnwindSafe for FileSystemEmbedded
impl Send for FileSystemEmbedded
impl Sync for FileSystemEmbedded
impl Unpin for FileSystemEmbedded
impl UnsafeUnpin for FileSystemEmbedded
impl UnwindSafe for FileSystemEmbedded
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more