use std::{collections::BTreeMap, sync::Arc}; use trustfall::{execute_query, FieldValue}; use crate::versioned::VersionedRustdocAdapter; type QueryResult = BTreeMap, FieldValue>; impl<'a> VersionedRustdocAdapter<'a> { pub fn run_query>, V: Into>( &self, query: &str, vars: BTreeMap, ) -> anyhow::Result + 'a>> { match self { {{#each version_numbers}} #[cfg(feature = "v{{this}}")] VersionedRustdocAdapter::V{{this}}(_, adapter) => { execute_query(self.schema(), adapter.clone(), query, vars) } {{/each}} } } }