Validate types and fields in serde with TryFrom
trait and #[serde(try_from = "FromType")]
.
See src/validate_field.rs
and src/validate_struct.rs
for the full code.
Use cargo test
to test it out.
A detailed guide is posted to dev.to
.
Validate fields in serde with TryFrom trait
Validate types and fields in serde with TryFrom
trait and #[serde(try_from = "FromType")]
.
See src/validate_field.rs
and src/validate_struct.rs
for the full code.
Use cargo test
to test it out.
A detailed guide is posted to dev.to
.
Validate fields in serde with TryFrom trait
MIT License