We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let's say I have two objects each with a different range:
struct InputA { #[validate(range(min = 0, max = 1))] pub val: f32 } struct InputB { #[validate(range(min = 1, max = 2))] pub val: f32 }
And now I want to convert InputA to InputB by mapping the val in the range of A to the range of B with a simple linear transformation.
InputA
InputB
Is it possible to use a From trait which can access the ranges on each val to perform the transformation?
From
val
The text was updated successfully, but these errors were encountered:
Nope, you can't access the validation rules programmatically currently
Sorry, something went wrong.
No branches or pull requests
Let's say I have two objects each with a different range:
And now I want to convert
InputA
toInputB
by mapping the val in the range of A to the range of B with a simple linear transformation.Is it possible to use a
From
trait which can access the ranges on eachval
to perform the transformation?The text was updated successfully, but these errors were encountered: