pub fn new(store: &Store, binary: &[u8]) -> Result<Module> {
        Module::validate(store, binary)?;
        // Note that the call to `unsafe` here should be ok because we
        // previously validated the binary, meaning we're guaranteed to pass a
        // valid binary for `store`.
        unsafe { Module::new_internal(store, binary, None) }
    }
/// Creates a new WebAssembly `Module` from the given in-memory `binary`
/// data.
///
/// The `binary` data provided must be a [binary-encoded][binary]
/// WebAssembly module. This means that the data for the wasm module must be
/// loaded in-memory if it's present elsewhere, for example on disk.
/// Additionally this requires that the entire binary is loaded into memory
/// all at once, this API does not support streaming compilation of a
/// module.
///
/// The WebAssembly binary will be decoded and validated. It will also be
/// compiled according to the configuration of the provided `store` and
/// cached in this type.
///
/// The provided `store` is a global cache for compiled resources as well as
/// configuration for what wasm features are enabled. It's recommended to
/// share a `store` among modules if possible.
///
/// # Errors
///
/// This function may fail and return an error. Errors may include
/// situations such as:
///
/// * The binary provided could not be decoded because it's not a valid
///   WebAssembly binary
/// * The WebAssembly binary may not validate (e.g. contains type errors)
/// * Implementation-specific limits were exceeded with a valid binary (for
///   example too many locals)
/// * The wasm binary may use features that are not enabled in the
///   configuration of `store`
///
/// The error returned should contain full information about why module
/// creation failed if one is returned.
///
/// [binary]: https://webassembly.github.io/spec/core/binary/index.html
Creates a new WebAssembly `Module` from the given in-memory `binary`
data.

The `binary` data provided must be a [binary-encoded][binary]
WebAssembly module. This means that the data for the wasm module must be
loaded in-memory if it's present elsewhere, for example on disk.
Additionally this requires that the entire binary is loaded into memory
all at once, this API does not support streaming compilation of a
module.

The WebAssembly binary will be decoded and validated. It will also be
compiled according to the configuration of the provided `store` and
cached in this type.

The provided `store` is a global cache for compiled resources as well as
configuration for what wasm features are enabled. It's recommended to
share a `store` among modules if possible.
Creates a new WebAssembly ` Module ` from the given in - memory ` binary ` data . The ` binary ` data provided must be a [ binary - encoded ] [ binary ] WebAssembly module . This means that the data for the wasm module must be loaded in - memory if it ' s present elsewhere for example on disk . Additionally this requires that the entire binary is loaded into memory all at once this API does not support streaming compilation of a module . The WebAssembly binary will be decoded and validated . It will also be compiled according to the configuration of the provided ` store ` and cached in this type . The provided ` store ` is a global cache for compiled resources as well as configuration for what wasm features are enabled . It ' s recommended to share a ` store ` among modules if possible .
pub fn new(store: &Store, binary: &[u8]) -> Result<Module> {
        Module::validate(store, binary)?;
        // Note that the call to `unsafe` here should be ok because we
        // previously validated the binary, meaning we're guaranteed to pass a
        // valid binary for `store`.
        unsafe { Module::new_internal(store, binary, None) }
    }
pub fn new ( store : & Store , binary : & [ u8 ] ) -> Result < Module > { Module :: validate ( store , binary ) ? ; // Note that the call to `unsafe` here should be ok because we // previously validated the binary, meaning we're guaranteed to pass a // valid binary for `store`. unsafe { Module :: new_internal ( store , binary , None ) } }
Creates a new WebAssembly `Module` from the given in-memory `binary`
data.
Creates a new WebAssembly ` Module ` from the given in - memory ` binary ` data .
store
&Store
binary
&[u8]
store
&Store
binary
&[u8]
errors
This function may fail and return an error. Errors may include
situations such as.

The binary provided could not be decoded because it's not a valid
WebAssembly binary
The WebAssembly binary may not validate
Implementation-specific limits were exceeded with a valid binary (for
example too many locals)
The wasm binary may use features that are not enabled in the
configuration of `store`

The error returned should contain full information about why module
creation failed if one is returned.


This function may fail and return an error . Errors may include situations such as . The binary provided could not be decoded because it ' s not a valid WebAssembly binary The WebAssembly binary may not validate Implementation - specific limits were exceeded with a valid binary ( for example too many locals ) The wasm binary may use features that are not enabled in the configuration of ` store ` The error returned should contain full information about why module creation failed if one is returned .