The structure and thermodynamics of a solid–fluid interface