ScopedSetState
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| state | [ValidationState](validationstate.md?sid=validators_validation_state_validationstate) | The state which has been set for the scope. |
| projector | function | A function that projects from the state to the field that has been set. |
| value | T | The previous value of the field that has been set. |
Constructor
Signature
@staticmethod
def new(
state: &'scope mut ValidationState,
projector: P,
new_value: T
) - > [ScopedSetState](scopedsetstate.md?sid=validators_validation_state_scopedsetstate)
Parameters
| Name | Type | Description |
|---|---|---|
| state | &'scope mut ValidationState | The mutable reference to the validation state being modified. |
| projector | P | A closure that maps the validation state to the specific field being scoped. |
| new_value | T | The temporary value to assign to the projected field for the duration of the scope. |