If a defendant feels that their rights have been violated, either during the arrest process or during the trial, this is often grounds for appeal. If the court violated the defendant’s rights and then went on to achieve a guilty verdict, the defendant will likely qualify for a new trial at minimum. This does require an appeals court to agree with the allegations that the defendant’s  rights were violated but since defendants’ rights are an enshrined constitutional right, failure to observe them is often a glaring and obvious breach of decorum.