char/avril

(wip) why'd you have to go and make things so complicaaaaated?

git clone https://git.t4t.associates/char/avril

Charlotte Somrearrange libs into lib and extensions into extsf4a0f5b

main
624 B15 linesraw
1use crate::{ProjectInput, Result};
2use std::{collections::BTreeMap, future::Future, pin::Pin};
3
4pub type Documents = BTreeMap<String, String>;
5pub type Refresh<'a> = Pin<Box<dyn Future<Output = Result<ProjectInput>> + 'a>>;
6
7/// The host owns acquisition, configuration and graph invalidation. Each refresh
8/// supplies an immutable generation; the native adapter never discovers imports.
9/// This future may be local: avril's runtime resolver uses thread-local graph state.
10pub trait ProjectService {
11    fn refresh(&mut self, documents: Documents) -> Refresh<'_>;
12    fn changed(&mut self) -> bool {
13        false
14    }
15}