URI-only handler helper. Like [`handle_with_position`] but for handlers that only need the document URI (no cursor position).
(
&self,
handler_name: &str,
uri: &str,
f: impl FnOnce(&str) -> Option<T>,
)
| 1430 | /// URI-only handler helper. Like [`handle_with_position`] but for |
| 1431 | /// handlers that only need the document URI (no cursor position). |
| 1432 | fn handle_with_uri<T>( |
| 1433 | &self, |
| 1434 | handler_name: &str, |
| 1435 | uri: &str, |
| 1436 | f: impl FnOnce(&str) -> Option<T>, |
| 1437 | ) -> Result<Option<T>> { |
| 1438 | Ok(self |
| 1439 | .with_file_content(handler_name, uri, None, |content, _| f(content)) |
| 1440 | .flatten()) |
| 1441 | } |
| 1442 | |
| 1443 | // ── Initialization helpers ─────────────────────────────────────────── |
| 1444 |
no test coverage detected