Roll out pastry on a lightly floured board and line a 20 cm 18-inch) pie plate.
Brush the pastry with a little egg white.
Filling: Melt butter in a small saucepan and cook onion slowly without browning for 2 minutes.
Mix onion with drained sweet corn and parsley and spread over pastry.
Beat eggs lightly with salt and pepper.
Heat cream until lukewarm, mix with eggs and pour over sweet corn.
Top with slices of ham or bacon and thin slices of cheese.
Bake in a moderately hot oven for 30-35 minutes, or until pastry is golden brown and the filling is set in the centre.