(&'a self, context: &'r Context<'c>, mathml: Element<'c>)
| 1125 | } |
| 1126 | |
| 1127 | pub fn evaluate<'a, 'c>(&'a self, context: &'r Context<'c>, mathml: Element<'c>) -> Result<Value<'c>> { |
| 1128 | // debug!("evaluate: {}", self); |
| 1129 | let result = self.rc.xpath.evaluate(context, mathml); |
| 1130 | return match result { |
| 1131 | Ok(val) => Ok( val ), |
| 1132 | Err(e) => { |
| 1133 | bail!( "{}\n\n", |
| 1134 | e.to_string() // remove confusing parts of error message from xpath |
| 1135 | .replace("OwnedPrefixedName { prefix: None, local_part:", "") |
| 1136 | .replace(" }", "") ); |
| 1137 | } |
| 1138 | }; |
| 1139 | } |
| 1140 | |
| 1141 | pub fn test_input<F>(self, f: F) -> bool where F: Fn(&str) -> bool { |
| 1142 | return f(self.rc.string.as_ref()); |
no outgoing calls
no test coverage detected