mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 21:28:21 +00:00
Renamed get_native_function to get_typed_function, marked former as deprecated.
This commit is contained in:
@@ -134,11 +134,27 @@ impl Exports {
|
||||
self.get(name)
|
||||
}
|
||||
|
||||
#[deprecated(
|
||||
since = "3.0.0",
|
||||
note = "get_native_function() has been renamed to get_typed_function(), just like NativeFunc has been renamed to TypedFunction."
|
||||
)]
|
||||
/// Get an export as a `TypedFunction`.
|
||||
pub fn get_native_function<Args, Rets>(
|
||||
&self,
|
||||
name: &str,
|
||||
) -> Result<TypedFunction<Args, Rets>, ExportError>
|
||||
where
|
||||
Args: WasmTypeList,
|
||||
Rets: WasmTypeList,
|
||||
{
|
||||
self.get_typed_function(name)
|
||||
}
|
||||
|
||||
/// Get an export as a `TypedFunction`.
|
||||
pub fn get_typed_function<Args, Rets>(
|
||||
&self,
|
||||
name: &str,
|
||||
) -> Result<TypedFunction<Args, Rets>, ExportError>
|
||||
where
|
||||
Args: WasmTypeList,
|
||||
Rets: WasmTypeList,
|
||||
|
||||
Reference in New Issue
Block a user