pub fn hotpatch_fn<F>(&self, ptr: F) -> Result<(), Box<dyn std::error::Error + '_>>
    where
        F: Fn(VaGen) -> Ret,
    {
        // The actual implementation is in toplevel
    }
/// Hotpatch this functor with functionality defined in `ptr`.
/// `ptr` can be a function pointer or `move` closure with the
/// same type signature as the functor's function.
///
/// ## Example
/// ```
/// #[patchable]
/// fn foo(_: i32, _: i32, _: i32) {}
///
/// fn bar(_: i32, _: i32, _: i32) {}
///
/// fn main() -> Result<(), Box<dyn std::error::Error>> {
///   foo.hotpatch_fn(bar)?;
///   foo.hotpatch_fn(move |a, b, c| println!("{} {} {}", a, b, c))?;
///   Ok(())
/// }
/// ```
///
/// Requires importing [crate::HotpatchFn].
///
/// ## VaArgs Note
/// Implementation is defined with the [`variadic_generics`](https://docs.rs/variadic_generics)
/// crate. This means
/// a macro is used to define a finite but large number of templated inputs.
/// If using functions with large numbers of inputs and `hotpatch_fn` does not
/// appear to be defined, compile `hotpatch` with the `large-signatures` feature
/// to increase the number of supported arguements.
Hotpatch this functor with functionality defined in `ptr`.
`ptr` can be a function pointer or `move` closure with the
same type signature as the functor's function.
Hotpatch this functor with functionality defined in ` ptr ` . ` ptr ` can be a function pointer or ` move ` closure with the same type signature as the functor ' s function .
pub fn hotpatch_fn<F>(&self, ptr: F) -> Result<(), Box<dyn std::error::Error + '_>>
    where
        F: Fn(VaGen) -> Ret,
    {
        // The actual implementation is in toplevel
    }
pub fn hotpatch_fn < F > ( & self , ptr : F ) -> Result < ( ) , Box < dyn std :: error :: Error + ' _ > > where F : Fn ( VaGen ) -> Ret , { // The actual implementation is in toplevel }
Hotpatch this functor with functionality defined in `ptr`.
Hotpatch this functor with functionality defined in ` ptr ` .
&self
ptr
F
example
None
[patchable]






Requires importing [crate::HotpatchFn].
Requires importing [ crate :: HotpatchFn ] .
vaargs note
Implementation is defined with the [`variadic_generics`]
crate. This means
a macro is used to define a finite but large number of templated inputs.
If using functions with large numbers of inputs and `hotpatch_fn` does not
appear to be defined, compile `hotpatch` with the `large-signatures` feature
to increase the number of supported arguements.
Implementation is defined with the [ ` variadic_generics ` ] crate . This means a macro is used to define a finite but large number of templated inputs . If using functions with large numbers of inputs and ` hotpatch_fn ` does not appear to be defined compile ` hotpatch ` with the ` large - signatures ` feature to increase the number of supported arguements .