Struct Module

#[repr(transparent)]
pub struct Module { /* private fields */ }

A WebAssembly.Module object contains stateless WebAssembly code that has already been compiled by the browser and can be efficiently shared with Workers, and instantiated multiple times.

MDN documentation

Implementations

impl Module

fn custom_sections(module: &Module, sectionName: &str) -> Array

The WebAssembly.customSections() function returns a copy of the contents of all custom sections in the given module with the given string name.

MDN documentation

impl Module

fn exports(module: &Module) -> Array

The WebAssembly.exports() function returns an array containing descriptions of all the declared exports of the given Module.

MDN documentation

impl Module

fn new(buffer_source: &JsValue) -> Result<Module, JsValue>

A WebAssembly.Module object contains stateless WebAssembly code that has already been compiled by the browser and can be efficiently shared with Workers, and instantiated multiple times.

MDN documentation

impl Module

fn imports(module: &Module) -> Array

The WebAssembly.imports() function returns an array containing descriptions of all the declared imports of the given Module.

MDN documentation

Trait Implementations

impl AsRef<JsValue> for Module

fn as_ref(&self) -> &JsValue

impl AsRef<Module> for Module

fn as_ref(&self) -> &Module

impl AsRef<Object> for Module

fn as_ref(&self) -> &Object

impl Clone for Module

fn clone(&self) -> Self

impl Debug for Module

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Deref for Module

type Target = Object;
fn deref(&self) -> &Object

impl Eq for Module

impl ErasableGeneric for Module

type Repr = JsValue;

impl From<JsValue> for Module

fn from(obj: JsValue) -> Self

impl FromWasmAbi for Module

type Abi = <JsValue as FromWasmAbi>::Abi;
unsafe fn from_abi(js: Self::Abi) -> Self

impl IntoJsGeneric for Module where Module: JsGeneric,

type JsCanon = Module;
fn to_js(self) -> Module

impl IntoWasmAbi for Module

type Abi = <JsValue as IntoWasmAbi>::Abi;
fn into_abi(self) -> Self::Abi

impl JsCast for Module

fn instanceof(val: &JsValue) -> bool
fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self

impl LongRefFromWasmAbi for Module

type Abi = <JsValue as LongRefFromWasmAbi>::Abi;
type Anchor = Module;
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor

impl OptionFromWasmAbi for Module

fn is_none(abi: &Self::Abi) -> bool

impl OptionIntoWasmAbi for Module

fn none() -> Self::Abi

impl PartialEq for Module

fn eq(&self, other: &Self) -> bool

impl Promising for Module

type Resolution = Module;

impl RefFromWasmAbi for Module

type Abi = <JsValue as RefFromWasmAbi>::Abi;
type Anchor = ManuallyDrop<Module>;
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor

impl StructuralPartialEq for Module

impl UpcastFrom<Module> for Module

impl WasmDescribe for Module

fn describe()

Auto Trait Implementations

impl Freeze for Module

impl RefUnwindSafe for Module

impl Send for Module

impl Sync for Module

impl Unpin for Module

impl UnsafeUnpin for Module

impl UnwindSafe for Module

Blanket Implementations

impl<P, T> Receiver for Module where P: Deref<Target = T> + ?Sized, T: ?Sized,

impl<S, T> Upcast<T> for Module where T: UpcastFrom<S> + ?Sized, S: ?Sized,

impl<T> Any for Module where T: 'static + ?Sized,

impl<T> Borrow<T> for Module where T: ?Sized,

impl<T> BorrowMut<T> for Module where T: ?Sized,

impl<T> CloneToUninit for Module where T: Clone,

impl<T> From<T> for Module

impl<T> JsGeneric for Module where T: ErasableGeneric<Repr = JsValue> + UpcastFrom<T> + Upcast<JsValue> + JsCast + 'static,

impl<T> ReturnWasmAbi for Module where T: IntoWasmAbi,

impl<T> ToOwned for Module where T: Clone,

impl<T> TryFromJsValue for Module where T: JsCast,

impl<T> VectorFromWasmAbi for Module where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorIntoWasmAbi for Module where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorRefIntoWasmAbi for Module where &'a T: for<'a> Into<JsValue>,

impl<T, U> Into<U> for Module where U: From<T>,

impl<T, U> TryFrom<U> for Module where U: Into<T>,

impl<T, U> TryInto<U> for Module where U: TryFrom<T>,