The former returns the replacement encoding for certain labels with which reacting to failure by falling back to another encoding would be dangerous. However, for the callers that react to failure by stopping processing instead of using a fallback, the latter makes more sense.
So which one to use is contextual. If there was a
FromStr wrapper for only one of these, it would have to be the former, because using the latter in the wrong context (when reacting to failure by using a fallback) is dangerous.
Is it Rustic to implement
FromStr as a wrapper for
Encoding::for_label() in this scenario or should it be left unimplemented when there is more than one way to parse a string even if one is preferred?