Skip to main content

WorkspaceScanner

Struct WorkspaceScanner 

Source
pub struct WorkspaceScanner { /* private fields */ }

Implementations§

Source§

impl WorkspaceScanner

Source

pub fn new() -> Self

Source

pub fn update_doc(&mut self, doc: &Document)

Workspace scanner has its own copies that are not always up to date. This should be called when there is a document change notification. When there is a full rescan, call this with all checkpoints right after the gather.

Source

pub fn get_workspace(&self) -> &Workspace

Borrow the workspace data

Source

pub fn set_workspace(&mut self, ws: Workspace)

Set the workspace data, source is probably another analysis object

Source

pub fn append_volatile_docs(&mut self, docs: Vec<Document>)

Add volatile documents to the workspace set, useful for piped documents

Source

pub fn gather_docs( &mut self, dirs: &Vec<Uri>, max_files: usize, ) -> Result<(), Box<dyn Error>>

Buffer all documents matching *.s in any of dirs, up to maximum count max_files, searching at most MAX_DIRS directories, using at most MAX_DEPTH recursions, and ignoring IGNORE_DIRS.

Source

pub fn scan(&mut self) -> Result<(), Box<dyn Error>>

Scan buffered documents for entries and includes. Assumes buffers are up to date.

Trait Implementations§

Source§

impl Navigate for WorkspaceScanner

Source§

fn visit(&mut self, curs: &TreeCursor<'_>) -> Result<Navigation, Box<dyn Error>>

Visitor to build information about the overall workspace. Important that this be efficient since every file is scanned. The caller should skip over all lines but those matching scan_patt. For this scan we do not need or want to descend into includes (no recursive includes).

Source§

fn descend( &mut self, _curs: &TreeCursor<'_>, ) -> Result<Navigation, Box<dyn Error>>

Source§

fn walk(&mut self, tree: &Tree) -> Result<(), Box<dyn Error>>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.