(kwargs: Option<&PyDict>)
| 113 | } |
| 114 | |
| 115 | pub 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] |
| 139 | struct DemoParser { |