MCPcopy Create free account
hub / github.com/LaihoE/Python-demoparser / to_hashmap

Method to_hashmap

src/parsing/stringtables.rs:55–71  ·  view source on GitHub ↗
(&self, py: Python<'_>)

Source from the content-addressed store, hash-verified

53
54impl UserInfo {
55 pub fn to_hashmap(&self, py: Python<'_>) -> HashMap<String, pyo3::Py<PyAny>> {
56 let mut hm: HashMap<String, pyo3::Py<PyAny>> = HashMap::new();
57 //hm.insert("version".to_string(), self.version.to_string());
58 hm.insert("steamid".to_string(), self.xuid.to_object(py));
59 //hm.insert("name".to_string(), self.name.to_string());
60 hm.insert("user_id".to_string(), self.user_id.to_object(py));
61 //hm.insert("guid".to_string(), self.guid.to_string());
62 //hm.insert("friends_id".to_string(), self.friends_id.to_string());
63 hm.insert("name".to_string(), self.name.to_string().to_object(py));
64 //hm.insert("fake_player".to_string(), self.fake_player.to_string());
65 //hm.insert("hltv".to_string(), self.hltv.to_string());
66 //hm.insert("custom_files".to_string(), self.custom_files.to_string());
67 //hm.insert("files_downloaded".to_string(), self.files_downloaded.to_string());
68 hm.insert("entity_id".to_string(), self.entity_id.to_object(py));
69 //hm.insert("tbd".to_string(), self.tbd.to_string());
70 hm
71 }
72}
73
74impl Demo {

Callers 1

parse_playersMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected