Haven't yet encountered a really harmful situation shooting on streets in my country, God forbid, but I personally consider the most vulnerable situation when yuo're shooting along with your dear aside of you (be it your wife, girlfriend, kids or whomever you really care for). That is you most vulnarable point, not your camera or even yourself.
That is why would I plan going shooting to somewhere potentially not safe, I'd never go with my family, but rather (if not alone) prefer a good friend (who is also photo geek of course) in whom I can trust.
Some time ago I read an excellent book on cerain Mossad operations and there was a chapter talking about their agents preparations and training (probaly relevant for other intelligence services in other countries):
When you're confronted (robbery) - give him readily you watch, you wallet, you shirt but try to avoid any complication by your resistance. Don't try to get faster then the bullet or smarter then the knife at your neck, hide your not always reasonable braveness deep in your soul.
However, when it comes to a real danger, you see your nice behavior isn't going to stop the offender or his/their real threat is your dear - then act as quickly as you can and in most harmful way you can. If you pull up you gun - for only one and single reason - shoot to kill, do not attempt to play just to try to frighten up the offender - he may loose control over his nerves and just shot and use his knife (when you're not prepared to use your weapon to tis full potential).
If you pull out your knife/cane - do accept you will use it.
An ordinary men on the street is always unprepared to the situation unlike the criminal who knows exactly what he is going to do and doesn't care the laws, so pshychologically the criminal always wins out at the first moments of the affair. Hence, your only sane benefit is to try to keep the things smooth if that is possible to get away safe, or otherwise, try to surprise the offender by acting first in your full strenth so that his loses his desire to commit what hi intended, and then, after the situation is under control - you may consider the legal proceedings (but first a big thank you God you're safe and in good health as well as you dear)
Mind you, that kind of behavior was/is recomended even for the people who are probably much more prepared mentally and physically for potentially challenging situations then an ordinary person (the majority on the forum, I guess), so I guess this is something to consider for us as well...