pub struct RootGraph {
cache: Cache,
revision: u64,
cancel: CancellationToken,
pub files: HashMap<FileID, Arc<AstDocument>>,
pub configs: HashMap<FileID, Arc<ConfigDocument>>,
}
Expand description
A fully linked version of all files, computed asynchronously
Fields§
§cache: Cache
§revision: u64
§cancel: CancellationToken
§files: HashMap<FileID, Arc<AstDocument>>
§configs: HashMap<FileID, Arc<ConfigDocument>>
Implementations§
source§impl RootGraph
impl RootGraph
pub fn contains(&self, uri: &Url) -> bool
pub fn timestamp(&self, uri: &Url) -> Option<Instant>
pub fn contains_id(&self, id: FileID) -> bool
pub fn type_of(&self, sym: RootSymbol) -> Option<Type>
pub fn config_by_uri(&self, name: &Url) -> Option<&ConfigDocument>
pub fn file_by_uri(&self, name: &Url) -> Option<&AstDocument>
pub fn file(&self, id: FileID) -> &AstDocument
pub fn file_id(&self, name: &Url) -> Option<FileID>
pub fn cancellation_token(&self) -> CancellationToken
pub fn cancel(&self)
pub fn resolve<'a>( &'a self, origin: FileID, path: &'a [Ustr], ) -> impl Iterator<Item = RootSymbol> + 'a
pub fn revision(&self) -> u64
sourcepub fn resolve_with_binding<'a>(
&'a self,
origin: FileID,
path: &'a [Ustr],
) -> impl Iterator<Item = Vec<(RootSymbol, usize)>> + 'a
pub fn resolve_with_binding<'a>( &'a self, origin: FileID, path: &'a [Ustr], ) -> impl Iterator<Item = Vec<(RootSymbol, usize)>> + 'a
find all symbols from origin under path, also keep track of which sections of the search path are bound to which symbols
sourcepub fn resolve_attributes<'a, F: FnMut(RootSymbol, &[Ustr])>(
&'a self,
origin: FileID,
context: &'a [Ustr],
f: F,
)
pub fn resolve_attributes<'a, F: FnMut(RootSymbol, &[Ustr])>( &'a self, origin: FileID, context: &'a [Ustr], f: F, )
find all attributes from origin under context, useful for aggregates
pub fn fs(&self) -> &FileSystem
pub fn dump(&self)
pub fn cache(&self) -> &Cache
pub fn new( files: &HashMap<FileID, Arc<AstDocument>>, configs: &HashMap<FileID, Arc<ConfigDocument>>, revision: u64, old: &Cache, err: &mut ErrorsAcc<'_>, check_state: &mut HashMap<FileID, Instant>, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RootGraph
impl RefUnwindSafe for RootGraph
impl Send for RootGraph
impl Sync for RootGraph
impl Unpin for RootGraph
impl UnwindSafe for RootGraph
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more