I must entreat you, to consider the words of this authority (Sir John Kelyng, Lord Chief Justice of the King’s Bench, 1665-71); the injured person may repel force by force against any who endeavors to commit any kind of felony; if any of the persons made an attack on these soldiers, with an intention to rob them, if it was but to take their hats feloniously, they had a right to kill them on the spot, and had no business to retreat; if a robber meets me in the street and commands me to surrender my purse, I have a right to kill him without asking questions; if a person commits a bare assault on me, this will not justify killing, but if he assaults me in such a manner, as to discover an intention to kill me, I have a right to destroy him, that I may put it out of his power to kill me. — John Adams, History of the Boston Massacre, March 5, 1770
(My emphasis.) Adams’ point was that the inherent right of self-defense was not denied to soldiers by dint of being soldiers. They were entitled to the same rights as any man on the street when it came to defense of self and property.
It doesn’t work that way in (formerly) Great Britain anymore.