multi

Function multi 

Source
pub fn multi<const LENGTH: usize>() -> impl for<'a> SideEffect<Api<'a> = MultiSideEffectRegistrar<'a>>
Expand description

Allows you to register multiple side effects sequentially, unlike the standard SideEffectRegistrar.

Instead of having to register all of your effects in one line, you can instead register them throughout the function, as they are needed, for convenience.

Although more convenient, multi has some implications:

  • You must manually pass in the number of side effects registered via the const generic
  • There is some (slight) added overhead over the traditional SideEffectRegistrar::register