So long as prosecutors stick to the prosecutorial functions of their office, they have absolute immunity in federal court for any alleged violation of civil rights. Most, if not all, states have similar provisions. If they go outside of the prosecutorial functions of the office, they have qualified immunity. Qualified immunity means they are immune if they acted in good faith and not clearly in violation of law (paraphrasing). For example, if a prosecutor went into the wrong house with a team of police officers to execute a search warrant, the prosecutor would have only qualified immunity, just like the police officers.
Jim's Rules of Carry: 1. Any gun is better than no gun. 2. A gun that is reliable is better than a gun that is not. 3. A hole in the right place is better than a hole in the wrong place. 4. A bigger hole is a better hole.