Is it always possible that for two operators $\hat A$ and $\hat B$, which have a commutator of $[\hat A, \hat B] = i \hbar$, we can write the action of these two operators to a function $f(a)$, which depends on the eigenvalues $a$ of $\hat A$, in the following way
$$ \hat A f(a) = a f(a) \\ \hat B f(a) = -i \hbar \frac{\partial}{\partial a}f(a). $$
Or stated differently: Does the form of the coordinate representation of the position and the momentum operator hold also for other operators with the commutator of $i \hbar$ or is this representation unique for position and momentum operator?
I remember vaguely that there is a theorem which exactly makes a statement about this.