The structure of reconnection layers: Application to the Earth's magnetopause