Hydrogen bonding is a key determinant of much macromolecular structure in nature, but individual donor and acceptor pairs are rarely observed in solution. Their weak interactions result in nanosecond lifetimes and rapid exchange of partners. Reversible encapsulation isolates molecules in very small spaces for milliseconds to hours and allows their characterization by NMR methods. Here we report a competitive study of hydrogen-bonding functions--carboxylic acids, primary amides, and boronic acids--within a multicomponent capsular assembly. The pairwise co-encapsulation of these molecules allows the direct observation of homodimeric boronic acids and their heterodimeric complexes with carboxylic acids and primary amides. The efficiency of boronic acids as hydrogen-bonding partners derives from their adaptable structures rather than from their intrinsic acid/base properties.