diff options
| author | Árni Dagur <agudmundsson@fc-md.umd.edu> | 2020-04-10 15:14:06 -0400 |
|---|---|---|
| committer | Árni Dagur <agudmundsson@fc-md.umd.edu> | 2020-04-10 15:14:06 -0400 |
| commit | 6baddc626d1e0cc70dfced64286ab7ed84903981 (patch) | |
| tree | 52491a565784dd4fb4193ac26da96c0aca77ce16 /src | |
| parent | 6015c72db40495105d876d869f6951fbd4cb6ee7 (diff) | |
Add __repr__ for HostnameSpecificResources
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -151,6 +151,19 @@ impl Into<HostnameSpecificResources> for RustHostnameSpecificResources { | |||
| 151 | } | 151 | } |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | #[pyproto] | ||
| 155 | impl PyObjectProtocol for HostnameSpecificResources { | ||
| 156 | fn __repr__(&self) -> PyResult<String> { | ||
| 157 | Ok(format!( | ||
| 158 | "HostnameSpecificResources<{} hide selectors, {} style selectors, {} exceptions, injected_javascript={:?}>", | ||
| 159 | self.hide_selectors.len(), | ||
| 160 | self.style_selectors.len(), | ||
| 161 | self.exceptions.len(), | ||
| 162 | self.injected_script, | ||
| 163 | )) | ||
| 164 | } | ||
| 165 | } | ||
| 166 | |||
| 154 | #[pyclass] | 167 | #[pyclass] |
| 155 | pub struct Engine { | 168 | pub struct Engine { |
| 156 | engine: RustEngine, | 169 | engine: RustEngine, |
