Function py_to_contract
Source pub fn py_to_contract(obj: &Bound<'_, PyAny>) -> PyResult<Contract>
Expand description
Convert a Python object (IBContract or dict) to a Rust Contract.
§Arguments
obj - The Python object to convert. Can be an IBContract instance (which has a .json() method)
or a dictionary.
§Returns
Returns the parsed Rust Contract.
§Errors
Returns a PyValueError if conversion fails.