Struct webc::wasmer_package::Volume
source · pub struct Volume { /* private fields */ }
Available on crate feature
package
only.Expand description
A lazily loaded volume in a Wasmer package.
Note that it is the package resolver’s role to interpret a package’s
crate::metadata::annotations::FileSystemMappings
. A Volume
contains
directories as they were when the package was published.
Implementations§
source§impl Volume
impl Volume
sourcepub fn read_file(&self, path: &PathSegments) -> Option<OwnedBuffer>
pub fn read_file(&self, path: &PathSegments) -> Option<OwnedBuffer>
Read a file from the volume.
sourcepub fn read_dir(
&self,
path: &PathSegments
) -> Option<Vec<(PathSegment, Option<[u8; 32]>, Metadata)>>
pub fn read_dir( &self, path: &PathSegments ) -> Option<Vec<(PathSegment, Option<[u8; 32]>, Metadata)>>
Read the contents of a directory.
sourcepub fn metadata(&self, path: &PathSegments) -> Option<Metadata>
pub fn metadata(&self, path: &PathSegments) -> Option<Metadata>
Get the metadata for a particular item.
Trait Implementations§
source§impl PartialEq for Volume
impl PartialEq for Volume
impl StructuralPartialEq for Volume
Auto Trait Implementations§
impl Freeze for Volume
impl RefUnwindSafe for Volume
impl Send for Volume
impl Sync for Volume
impl Unpin for Volume
impl UnwindSafe for Volume
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