  We describe the maximal class of functions $f$ on the real line, for which
the Lifshitz--Krein trace formula $\operatorname{trace}(f(A)-f(B))=\int_{\Bbb
R} f'(s)\boldsymbol{\xi}(s)\,ds$ holds for arbitrary self-adjoint operators $A$
and $B$ with $A-B$ in the trace class $\boldsymbol{S}_1$. We prove that this
class of functions coincide with the class of operator Lipschitz functions.
