Struct galvan_resolver::LookupContext
source · pub struct LookupContext<'a> {
pub types: HashMap<TypeId, &'a TypeDecl>,
pub functions: HashMap<FunctionId, &'a FnDecl>,
pub main: Option<&'a MainDecl>,
}Fields§
§types: HashMap<TypeId, &'a TypeDecl>Types are resolved by their name
functions: HashMap<FunctionId, &'a FnDecl>Functions are resolved by their name and - if present - named arguments and their receiver type
fn foo(a: i32, b: i32) -> i32 is identified as foo
fn foo(bar a: i32, b: i32) -> i32 is identified as foo:bar
fn foo(self: i32, b: i32) -> i32 is identified as i32::foo
main: Option<&'a MainDecl>Implementations§
source§impl<'a> LookupContext<'a>
impl<'a> LookupContext<'a>
pub fn new(asts: &'a [Ast]) -> Result<Self, LookupError>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for LookupContext<'a>
impl<'a> Send for LookupContext<'a>
impl<'a> Sync for LookupContext<'a>
impl<'a> Unpin for LookupContext<'a>
impl<'a> UnwindSafe for LookupContext<'a>
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