DebugRecord¶
- class hugr.debug_info.DebugRecord[source]¶
Bases:
ABCAbstract base class for debug records.
Methods
Decode a debug record from json.
Encodes the record as a dictionary of native types that can be serialized by json.dump.
- classmethod from_json(value: str | int | float | bool | None | Mapping[str, str | int | float | bool | None | Mapping[str, JsonType] | list[JsonType]] | list[str | int | float | bool | None | Mapping[str, JsonType] | list[JsonType]]) DebugRecord[source]¶
Decode a debug record from json. This is not an abstract method because when decoding from json by calling DebugRecord.from_json we do not have concrete subtype information, so we decode from the explicit variant tag stored in kind instead.
- abstractmethod to_json() str | int | float | bool | None | Mapping[str, str | int | float | bool | None | Mapping[str, JsonType] | list[JsonType]] | list[str | int | float | bool | None | Mapping[str, JsonType] | list[JsonType]][source]¶
Encodes the record as a dictionary of native types that can be serialized by json.dump.