/// A entry in a WebAssembly module's export section. #[derive(Debug)] pubstruct Export<'a> { /// Where this export was defined. pub span: Span, /// The name of this export from the module. pub name: &'a str, /// The kind of item being exported. pub kind: ExportKind, /// What's being exported from the module. pub item: Index<'a>,
}
/// Different kinds of elements that can be exported from a WebAssembly module, /// contained in an [`Export`]. #[derive(Debug, Clone, Copy, Hash, Eq, PartialEq)] #[allow(missing_docs)] pubenum ExportKind {
Func,
Table,
Memory,
Global,
Tag,
}
impl<'a> Parse<'a> for Export<'a> { fn parse(parser: Parser<'a>) -> Result<Self> { let span = parser.parse::<kw::export>()?.0; let name = parser.parse()?; let (kind, item) = parser.parens(|p| Ok((p.parse()?, p.parse()?)))?;
Ok(Export {
span,
name,
kind,
item,
})
}
}
kw_conversions! {
func => Func
table => Table
global => Global
tag => Tag
memory => Memory
}
/// A listing of inline `(export "foo")` statements on a WebAssembly item in /// its textual format. #[derive(Debug, Default)] pubstruct InlineExport<'a> { /// The extra names to export an item as, if any. pub names: Vec<&'a str>,
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.