In most cases it's not really necessary to have nanosecond (or even microsecond) interrupts. STM32 has robust timers and other periphery which can do many tasks without your manual I/O pin-switching from an interrupt.
But even for the 216MHz clocks of STM32F7 timer 2ns is too much. 216MHz will give you ~4.63ns if my calculations are precise. There is also the GPIO speed limit to take into account, for STM32F7 it's 180MHz (I/O compensation cell should be enabled).