Distance is the deciding factor, as someone else stated. Alot of people focus on this. In most cases, it is not going to be an issue because people do not rob or rape from across the street. They bump up on you, get in your face...so, as soon as that happens and they are in your Sphere...you know there is a possibility this could be the segue. Act accordingly.
In some cases, the person is just going to tell you they have something. Maybe they have the knife or gun, maybe they don't. They might motion with something in the pocket. In cases like that, don't act like a badass and possibly get shot. Act like a wuss and then hit them in the throat with all you have. Good edge of the hand [axe hand] shot to the throat. Cover up your face beforehand like you're going to cry or something. Your weakness will graft a set of huge balls on a criminal. Make them overconfident, then hit them right in the trachea.
And don't stop hitting them until they hit the ground. If they are still trying to get something out of their pocket or waistband, stomp on that hand so they can't play piano or with weapons for a while...let them know they were there...as we used to say...
We're talking about CQC. Even if I were so blessed as to have a CCW in this outhouse of a State, I would still respond that way. You cannot out-draw a drawn gun. Across the street and "Public Shooter" scenarios are a whole other ball of wax entirely. I think in most "Street Situations," the edged weapon is the equal of a handgun. It's a battlefield, but a different type of battlefield. And some Military thought comes into play but not all of it. Same with Law Enforcement experience. If you're not a Cop, you're not going to have a Dispatcher informing you, "Man with a knife." You're going to find out in the worst way possible, so alot of the advice from Cops is not going to apply either.