pub struct Manifest {
pub origin: Option<String>,
pub use_map: IndexMap<String, UrlOrManifest>,
pub package: IndexMap<String, Annotation>,
pub atoms: IndexMap<String, Atom>,
pub commands: IndexMap<String, Command>,
pub bindings: Vec<Binding>,
pub entrypoint: Option<String>,
}
Expand description
Manifest of the file, see spec §2.3.1
Fields§
§origin: Option<String>
If this manifest was vendored from an external source, where did it originally come from? Necessary for vendoring dependencies.
use_map: IndexMap<String, UrlOrManifest>
Dependencies of this file (internal or external)
package: IndexMap<String, Annotation>
Package version, author, license, etc. information
atoms: IndexMap<String, Atom>
Atoms (executable files) in this container
commands: IndexMap<String, Command>
Commands that this container can execute (empty for library-only containers)
bindings: Vec<Binding>
Binding descriptions of this manifest
entrypoint: Option<String>
Entrypoint (default command) to lookup in self.commands
when invoking wasmer run file.webc
Implementations§
source§impl Manifest
impl Manifest
pub fn package_annotation<T>(&self, name: &str) -> Result<Option<T>, Error>where
T: DeserializeOwned,
pub fn atom_signature(&self, atom_name: &str) -> Result<AtomSignature, Error>
source§impl Manifest
impl Manifest
Well-known annotations.
sourcepub fn filesystem(&self) -> Result<Option<FileSystemMappings>, Error>
pub fn filesystem(&self) -> Result<Option<FileSystemMappings>, Error>
Use Get the package’s FileSystemMappings
annotations stored at
FileSystemMappings::KEY
.
pub fn update_filesystem( &mut self, mapping: FileSystemMappings, ) -> Result<(), Error>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Manifest
impl<'de> Deserialize<'de> for Manifest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Manifest
Auto Trait Implementations§
impl Freeze for Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnwindSafe for Manifest
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)