The U.S. Supreme Court has ruled that the nation’s former President, Donald J. Trump, is entitled to nearly unbridled immunity when he holds the title of president, and that the Eighth Amendment does not prevent a municipality from enforcing criminal penalties against homeless people who are sleeping outdoors.