pub struct VirtualWorkspace {
pub virtual_url_generator: VirtualUrlGenerator,
pub analysis: EmmyLuaAnalysis,
/* private fields */
}Expand description
A virtual workspace for testing.
Fields§
§virtual_url_generator: VirtualUrlGenerator§analysis: EmmyLuaAnalysisImplementations§
Source§impl VirtualWorkspace
impl VirtualWorkspace
pub fn new() -> Self
pub fn new_with_init_std_lib() -> Self
pub fn def(&mut self, content: &str) -> FileId
pub fn def_file(&mut self, file_name: &str, content: &str) -> FileId
pub fn def_files(&mut self, files: Vec<(&str, &str)>) -> Vec<FileId>
pub fn get_node<Ast: LuaAstNode>(&self, file_id: FileId) -> Ast
pub fn ty(&mut self, type_repr: &str) -> LuaType
pub fn expr_ty(&mut self, expr: &str) -> LuaType
pub fn check_type(&self, source: &LuaType, compact_type: &LuaType) -> bool
pub fn enable_check(&mut self, diagnostic_code: DiagnosticCode)
pub fn check_code_for( &mut self, diagnostic_code: DiagnosticCode, block_str: &str, ) -> bool
pub fn check_code_for_namespace( &mut self, diagnostic_code: DiagnosticCode, block_str: &str, ) -> bool
pub fn enable_full_diagnostic(&mut self)
pub fn humanize_type(&self, ty: LuaType) -> String
pub fn get_db_mut(&mut self) -> &mut DbIndex
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VirtualWorkspace
impl RefUnwindSafe for VirtualWorkspace
impl Send for VirtualWorkspace
impl Sync for VirtualWorkspace
impl Unpin for VirtualWorkspace
impl UnwindSafe for VirtualWorkspace
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more