pub struct Context {
pub specification: Specification,
pub diagnostics: BTreeMap<Uri, Diagnostics>,
}
Expand description
Builder context.
Fields§
§specification: Specification
In-progress specification.
diagnostics: BTreeMap<Uri, Diagnostics>
Accumulated diagnostics per Uri.
Implementations§
Source§impl Context
impl Context
Sourcepub fn build_doc(&mut self, doc: &TextDocumentItem)
pub fn build_doc(&mut self, doc: &TextDocumentItem)
Build a text document.
Sourcepub fn build_file(&mut self, file: Cursor<'_>)
pub fn build_file(&mut self, file: Cursor<'_>)
Build the contents of a single file into this context. Infallible, but might report errors!
Sourcepub fn error(&mut self, error: DiagnosticError, loc: &FileLocation)
pub fn error(&mut self, error: DiagnosticError, loc: &FileLocation)
Report a DiagnosticError at this location.
Sourcepub fn warn(&mut self, warning: DiagnosticWarning, loc: &FileLocation)
pub fn warn(&mut self, warning: DiagnosticWarning, loc: &FileLocation)
Report a DiagnosticWarning at this location.
Sourcepub fn add_diagnostic(&mut self, diagnostic: Diagnostic, uri: &Uri)
pub fn add_diagnostic(&mut self, diagnostic: Diagnostic, uri: &Uri)
Add any diagnostic to its Uri entry.
Trait Implementations§
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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