During the crime, it is called self-defense, (notwehr) and in not punishable. VERY shortly after the crime it is called justified short time insanity (gerechtfertigte unzurechnungsfähigkeit) and is also not punishable.
AFTER the crime, it is considered also a crime to hurt or even kill the "suspect" by anyone but the state and the judiciary system.
What does happen to the perpetrator sometimes is murder by family or friends which is naturally a crime but seen as many a "justified" to such an extent that in a trial by jury, the sentence is usually milder and the person is sometimes considered a hero. Depending on the country and religion, the reactions are different.
A german truck driver was lynched in Spain after running a 10 year old boy down on his bicycle on the steet in a small town back in 1997. The police could not find anyone who would give a statement or name a person who saw anything...it just happened and nobody was punished.
No matter what, that what a person, no matter which gender or age, goes thru in a sexual violent act...will never be the same the rest of their lives and the perp usually does not get a "life-time" long punishment....