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

Function parse_kwargs_event

src/lib.rs:115–136  ·  view source on GitHub ↗
(kwargs: Option<&PyDict>)

Source from the content-addressed store, hash-verified

113}
114
115pub fn parse_kwargs_event(kwargs: Option<&PyDict>) -> (bool, Vec<String>) {
116 match kwargs {
117 Some(k) => {
118 let mut rounds = false;
119 let mut props: Vec<String> = vec![];
120 match k.get_item("rounds") {
121 Some(p) => {
122 rounds = p.extract().unwrap();
123 }
124 None => {}
125 }
126 match k.get_item("props") {
127 Some(t) => {
128 props = t.extract().unwrap();
129 }
130 None => {}
131 }
132 (rounds, props)
133 }
134 None => (false, vec![]),
135 }
136}
137
138#[pyclass]
139struct DemoParser {

Callers 1

parse_eventsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected