ValidateToFrozenSet
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| py | Python | The Python interpreter instance used for managing object lifecycle and memory within the validation context. |
| input | [Input](../../input/input/abstract/input.md?sid=input_input_abstract_input) | The raw input data being validated and converted into a frozen set. |
| f_set | Bound< PyFrozenSet > | A reference to the Python frozenset object being populated during the validation process. |
| max_length | usize | The maximum number of elements allowed in the resulting frozen set; validation fails if this limit is exceeded. |
| item_validator | [CombinedValidator](../mod/combinedvalidator.md?sid=validators_mod_combinedvalidator) | The validator instance applied to each individual element within the input collection. |
| state | [ValidationState](../validation/state/validationstate.md?sid=validators_validation_state_validationstate) | The current validation state used to track errors, context, and recursive depth across the validation tree. |
| fail_fast | bool | A flag that determines whether to stop validation immediately upon encountering the first error. |
Constructor
Signature
def ValidateToFrozenSet(
py: Python< 'py >,
input: &'a I,
f_set: &'a Bound< 'py, PyFrozenSet >,
max_length: Option< usize >,
item_validator: &'a CombinedValidator,
state: &'a mut ValidationState< 's, 'py >,
fail_fast: bool
)
Parameters
| Name | Type | Description |
|---|---|---|
| py | Python< 'py > | The Python interpreter instance. |
| input | &'a I | The input data to be validated. |
| f_set | &'a Bound< 'py, PyFrozenSet > | The target frozen set object. |
| max_length | Option< usize > | Optional maximum length constraint for the set. |
| item_validator | &'a CombinedValidator | The validator used for individual items within the set. |
| state | &'a mut ValidationState< 's, 'py > | The current state of the validation process. |
| fail_fast | bool | Whether to stop validation immediately upon the first error. |
Methods
validate()
def validate(
input: [Input](../../input/input/abstract/input.md?sid=input_input_abstract_input),
state: [ValidationState](../validation/state/validationstate.md?sid=validators_validation_state_validationstate)
) - > Bound< 'py, PyFrozenSet >
Validates the input data against the frozen set constraints and item-level validation rules.
Parameters
| Name | Type | Description |
|---|---|---|
| input | [Input](../../input/input/abstract/input.md?sid=input_input_abstract_input) | The raw input data to be validated and converted into a frozen set. |
| state | [ValidationState](../validation/state/validationstate.md?sid=validators_validation_state_validationstate) | The current validation context used to track errors and recursion depth. |
Returns
| Type | Description |
|---|---|
Bound< 'py, PyFrozenSet > | A new frozen set containing the validated and potentially transformed items. |