Cartesianness: topological spaces, uniform spaces, and affine schemes