1) Preheat the oven to 375°F.
2) Arrange the doughnut pieces (or whole mini doughnuts) in a buttered 9" x 9" casserole or baking pan. If using large, whole doughnuts, break them into bite-sized pieces. The pan should be about half full of doughnuts.
3) Sprinkle raisins or fruit, if using, evenly over doughnut pieces.
4) To make the custard, whisk the eggs, milk, salt, vanilla, and sugar together until well blended.
5) Pour the custard evenly over the doughnut pieces in the pan. Gently press the pieces into the liquid, being careful not to break the doughnuts up too much.
6) Bake the pudding for 20 to 25 minutes, until the custard is set. Remove it from the oven and cool it for 10 to 15 minutes before serving. Top with whipped cream or ice cream, if desired. Cover and refrigerate any leftovers.