| 117 | |
| 118 | #[async_trait::async_trait] |
| 119 | pub trait WorkspaceDocuments: Send + Sync { |
| 120 | async fn read_text_document( |
| 121 | &self, |
| 122 | full_file_path: &PathBuf, |
| 123 | range: Option<Range>, |
| 124 | ) -> Result<String, Box<dyn Error + Send + Sync>>; |
| 125 | async fn list_files(&self) -> Vec<PathBuf>; |
| 126 | fn get_did_open_configuration(&self) -> DidOpenConfiguration; |
| 127 | fn is_did_open_document(&self, file_path: &str) -> bool; |
| 128 | fn add_did_open_document(&mut self, file_path: &str); |
| 129 | } |
| 130 | |
| 131 | pub struct WorkspaceDocumentsHandler { |
| 132 | cache: Arc<RwLock<HashMap<PathBuf, Option<String>>>>, |
nothing calls this directly
no outgoing calls
no test coverage detected