Can you use whole eggs instead of just egg yolks in chocolate pudding?

Most chocolate pudding recipes I find are egg free.

However a chocolate pudding that uses eggs yolks is essentially a chocolate custard. If you used whole eggs in a custard it would not set the same as when made the usual way with just yolks. Some custards do have beaten egg white added separately after they set.

Note: there is a British recipe for steamed "chocolate pudding" that uses whole eggs, but its texture is more like a cake than pudding.