Calculating partial callback

How can I find out if a unit has to reach the destination point, or can only reach partially? The full viewing of the documentation did not answer the question.
Thanks in advance.

UPD: I’m using recast path and can’t use GetNearest().

“Reached partially” is a surprisingly vague description. The details differ from game to game.
You can check if there is a path to a given destination using https://arongranberg.com/astar/docs/pathutilities.html#IsPathPossible