pub trait IntoFunctionMut<'env, Marker> {
// Required method
fn into_function_mut(self) -> DynamicFunctionMut<'env>;
}Expand description
A trait for types that can be converted into a DynamicFunctionMut.
This trait is automatically implemented for any type that implements
ReflectFnMut and TypedFunction.
This trait can be seen as a superset of IntoFunction.
See the module-level documentation for more information.
§Trait Parameters
This trait has a Marker type parameter that is used to get around issues with
unconstrained type parameters when defining impls with generic arguments or return types.
This Marker can be any type, provided it doesn’t conflict with other implementations.
Additionally, it has a lifetime parameter, 'env, that is used to bound the lifetime of the function.
For named functions and some closures, this will end up just being 'static,
however, closures that borrow from their environment will have a lifetime bound to that environment.
Required Methods§
Sourcefn into_function_mut(self) -> DynamicFunctionMut<'env>
fn into_function_mut(self) -> DynamicFunctionMut<'env>
Converts Self into a DynamicFunctionMut.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".