Skip to main content

IntoFunctionMut

Trait IntoFunctionMut 

Source
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§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'env, F, Marker1, Marker2> IntoFunctionMut<'env, (Marker1, Marker2)> for F
where F: ReflectFnMut<'env, Marker1> + TypedFunction<Marker2> + 'env,

Source§

impl<'env> IntoFunctionMut<'env, ()> for DynamicFunction<'env>

Source§

impl<'env> IntoFunctionMut<'env, ()> for DynamicFunctionMut<'env>