You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is not such attribute. I think it would be useless mostly. You can try to utilize an expecting attribute to override default serde error message:
#[derive(Deserialize,Debug)]#[serde(deny_unknown_fields)]#[serde(expecting = "expected one of `query`, `limit`")]pubstructSearch{query:Option<String>,#[serde(default = "false")]limit:usize,#[serde(default = "false")]experimental:bool,}
But I'm not sure that it would work in your case, because it is only one possible error message
Is there a way to hide a field akin to what we can do in clap.
Here is my structure;
And when I receive an unknown field, the following error message is thrown, which is great;
But I would like to hide the
experimental
field from the error message.I was looking for something like that:
But it doesn’t exist. Did I miss something?
The text was updated successfully, but these errors were encountered: