Effective degrees of freedom smoothers

When using a “smooth” term like s(x) in a model formula, is there a way to extract the “effective degrees of freedom” associated with x from the fitted object? (and if so, what way?)

I am not sure whether this kind of degrees of freedom is reasonably defined in a Bayesian framework, but in any case you cannot extract it, but you get the fully posterior distribution of the standard deviation of the non-linear coefficients of the spline.