Currently, the restrict method is limited to the Serializable class and the Serialize module, and cannot be used within a choice block. It would be helpful to extend this functionality to choice, allowing predefined, inherited, or imported attributes to be added. Additionally, there should be a way to remove attributes from a choice block when needed.
Extending restrict and adding attribute removal support would improve flexibility and ensure consistent behavior across different serialization structures.
Currently, the
restrictmethod is limited to theSerializableclass and theSerializemodule, and cannot be used within achoiceblock. It would be helpful to extend this functionality tochoice, allowing predefined, inherited, or imported attributes to be added. Additionally, there should be a way to remove attributes from achoiceblock when needed.Extending
restrictand adding attribute removal support would improve flexibility and ensure consistent behavior across different serialization structures.