MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / into_py_dict

Method into_py_dict

flow-rs/src/loader/python/envelope.rs:142–155  ·  view source on GitHub ↗
(self, py: Python)

Source from the content-addressed store, hash-verified

140
141impl IntoPyDict for EnvelopeInfo {
142 fn into_py_dict(self, py: Python) -> &PyDict {
143 let dict = PyDict::new(py);
144 macro_rules! store {
145 ($k: ident) => {
146 dict.set_item(stringify!($k), self.$k).unwrap();
147 };
148 }
149 store!(from_addr);
150 store!(to_addr);
151 store!(transfer_addr);
152 store!(partial_id);
153 store!(tag);
154 dict
155 }
156}
157
158pub fn envelope_register(module: &PyModule) -> PyResult<()> {

Callers 5

analyzeFunction · 0.80
execMethod · 0.80
analyzeFunction · 0.80
decode_videoFunction · 0.80
to_dictMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected