pub(crate) struct Workspace {
open: HashMap<Uri, OpenDocument>,
projects: Vec<Project>,
}Fields§
§open: HashMap<Uri, OpenDocument>§projects: Vec<Project>Implementations§
Source§impl Workspace
impl Workspace
pub(crate) fn update( &mut self, uri: &Uri, text: String, version: i32, encoding: Encoding, ) -> Refreshed
pub(crate) fn close(&mut self, uri: &Uri, encoding: Encoding) -> Refreshed
Sourcepub(crate) fn locate(
&self,
uri: &Uri,
position: Position,
encoding: Encoding,
) -> Option<Cursor<'_>>
pub(crate) fn locate( &self, uri: &Uri, position: Position, encoding: Encoding, ) -> Option<Cursor<'_>>
The project file a request points into, and the byte offset it points at.
Sourcepub(crate) fn file(&self, uri: &Uri) -> Option<(&Project, FileId)>
pub(crate) fn file(&self, uri: &Uri) -> Option<(&Project, FileId)>
The project holding uri, and which of its files it is.
Sourcefn refresh(&mut self, uri: &Uri, encoding: Encoding) -> Refreshed
fn refresh(&mut self, uri: &Uri, encoding: Encoding) -> Refreshed
Analyses again the project uri belongs to. When uri was just closed, the project
stays only while another of its files is open.
Sourcefn sources(&self, uri: &Uri, warnings: &mut Vec<String>) -> Vec<Source>
fn sources(&self, uri: &Uri, warnings: &mut Vec<String>) -> Vec<Source>
The files of the project the open document uri belongs to: the entry file first,
with the text of open documents and of the rest as saved.
Sourcefn source(&self, path: &Path, warnings: &mut Vec<String>) -> Option<Source>
fn source(&self, path: &Path, warnings: &mut Vec<String>) -> Option<Source>
The source saved at path, or its open document’s text when it is open.
fn publish( &self, uri: &Uri, diagnostics: Vec<Diagnostic>, ) -> PublishDiagnosticsParams
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Workspace
impl Freeze for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnsafeUnpin for Workspace
impl UnwindSafe for Workspace
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