pub struct Workspace { /* private fields */ }Expand description
The project workspace.
It contains all modules imported and validates them against each other.
Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn add_local_module(&mut self, module_path: &str, module: File)
pub fn add_local_module(&mut self, module_path: &str, module: File)
Adds a new local module to the workspace.
Sourcepub fn validate(&mut self) -> Result<(), ParserError>
pub fn validate(&mut self) -> Result<(), ParserError>
Validates all modules in the workspace.
This function is fail-fast. Meaning, it will fail at each first error it founds.
Sourcepub fn package_local_modules(&self) -> &HashMap<String, File>
pub fn package_local_modules(&self) -> &HashMap<String, File>
Gets a reference to the local modules in the workspace.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin 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