Struct uvls::core::semantic::RootGraph

source ·
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

source

pub fn contains(&self, uri: &Url) -> bool

source

pub fn timestamp(&self, uri: &Url) -> Option<Instant>

source

pub fn contains_id(&self, id: FileID) -> bool

source

pub fn type_of(&self, sym: RootSymbol) -> Option<Type>

source

pub fn config_by_uri(&self, name: &Url) -> Option<&ConfigDocument>

source

pub fn file_by_uri(&self, name: &Url) -> Option<&AstDocument>

source

pub fn file(&self, id: FileID) -> &AstDocument

source

pub fn file_id(&self, name: &Url) -> Option<FileID>

source

pub fn cancellation_token(&self) -> CancellationToken

source

pub fn cancel(&self)

source

pub fn resolve<'a>( &'a self, origin: FileID, path: &'a [Ustr], ) -> impl Iterator<Item = RootSymbol> + 'a

source

pub fn revision(&self) -> u64

source

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

source

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

source

pub fn fs(&self) -> &FileSystem

source

pub fn dump(&self)

source

pub fn cache(&self) -> &Cache

source

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§

source§

impl Clone for RootGraph

source§

fn clone(&self) -> RootGraph

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RootGraph

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for RootGraph

source§

fn default() -> RootGraph

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
§

impl<T> To for T
where T: ?Sized,

§

fn to<T>(self) -> T
where Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more