-
I am trying to de-serialize into a type using I noticed there is a "format" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, that is currently not possible. The
|
Beta Was this translation helpful? Give feedback.
Hi, that is currently not possible. The
DisplayFromStr
does not allow any modification of the serialized string. I don't think it necessarily makes sense to add support for that in this crate. It is simple enough to create your own customMyDisplayFromStr
type with any string modification operation you need, instead of a limited pre-defined set. You could also define a generic type likeMyDisplayFromStr<Uppercase>
if you need that flexibility. Uppercasing a String is also so complicated that it has different meanings, so picking one probably doesn't work too well.Uppercase
cannot be combined with any arbitrary other type. The types in theformat
module are only needed if some other type …