1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use super::Options;
use crate::extn::prelude::*;
impl ConvertMut<Value, Options> for Artichoke {
fn convert_mut(&mut self, value: Value) -> Options {
if let Ok(options) = value.implicitly_convert_to_int(self) {
Options::from(options)
} else if let Ok(options) = value.try_into::<Option<bool>>(self) {
Options::from(options)
} else if let Ok(options) = value.try_into_mut::<&[u8]>(self) {
Options::from(options)
} else {
Options::with_ignore_case()
}
}
}