 He is entitled to at least presumptive immunity from prosecution for all his official acts. There is no immunity for unofficial acts. So if you want to deal with the president, and I think the same thing applies to Supreme Court judges. They can be impeached. You follow the constitutional guidelines.