Skip to main content

CallDynFn

Type Alias CallDynFn 

Source
pub type CallDynFn = fn(&mut DynSegment, &[&dyn Any]) -> Result<Box<dyn Any>>;
Expand description

A monomorphized dispatcher for DynClosure::call_boxed: runs a closure’s body via DynSegment::call_dyn::<R> for some concrete R the dispatcher itself already knows, boxing the result so the caller (which only knows R dynamically, as a TypeId) doesn’t need to.