pub(crate) struct Project {
uris: Vec<Uri>,
documents: Vec<Document>,
pub index: Index,
diagnostics: Vec<Diagnostic>,
}Fields§
§uris: Vec<Uri>File i is uris[i] and documents[i].
documents: Vec<Document>§index: Index§diagnostics: Vec<Diagnostic>Syntax errors from every file, or type errors once they all parse.
Implementations§
Source§impl Project
impl Project
Sourcepub(crate) fn new(sources: Vec<Source>) -> Self
pub(crate) fn new(sources: Vec<Source>) -> Self
Analyses sources as one program; the first is the entry file.
pub(crate) fn file_of(&self, uri: &Uri) -> Option<FileId>
Sourcepub(crate) fn files(&self) -> impl Iterator<Item = (FileId, &Uri)>
pub(crate) fn files(&self) -> impl Iterator<Item = (FileId, &Uri)>
Every file with its address.
pub(crate) fn document(&self, file: FileId) -> &Document
Sourcepub(crate) fn text(&self, span: Span) -> &str
pub(crate) fn text(&self, span: Span) -> &str
The text of span, in whichever file it points into.
pub(crate) fn location(&self, span: Span, encoding: Encoding) -> Location
Sourcepub(crate) fn diagnostics_in(
&self,
file: FileId,
) -> impl Iterator<Item = &Diagnostic>
pub(crate) fn diagnostics_in( &self, file: FileId, ) -> impl Iterator<Item = &Diagnostic>
The errors whose main place is in file.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Project
impl Freeze for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl UnsafeUnpin for Project
impl UnwindSafe for Project
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