pub struct GlobalContext<'source, 'temp, 'out> {
ast_expressions: &'temp Arena<Expression<'source>>,
types: &'temp Arena<Type<'source>>,
globals: &'temp mut FastHashMap<&'source str, LoweredGlobalDecl>,
module: &'out mut Module,
const_typifier: &'temp mut Typifier,
global_expression_kind_tracker: &'temp mut ExpressionKindTracker,
}
Expand description
State for constructing a crate::Module
.
Fields§
§ast_expressions: &'temp Arena<Expression<'source>>
The TranslationUnit
’s expressions arena.
types: &'temp Arena<Type<'source>>
The TranslationUnit
’s types arena.
globals: &'temp mut FastHashMap<&'source str, LoweredGlobalDecl>
The map from the names of module-scope declarations to the Naga IR
Handle
s we have built for them, owned by Lowerer::lower
.
module: &'out mut Module
The module we’re constructing.
const_typifier: &'temp mut Typifier
§global_expression_kind_tracker: &'temp mut ExpressionKindTracker
Implementations§
source§impl<'source> GlobalContext<'source, '_, '_>
impl<'source> GlobalContext<'source, '_, '_>
fn as_const(&mut self) -> ExpressionContext<'source, '_, '_>
fn as_override(&mut self) -> ExpressionContext<'source, '_, '_>
fn ensure_type_exists( &mut self, name: Option<String>, inner: TypeInner, ) -> Handle<Type>
Auto Trait Implementations§
impl<'source, 'temp, 'out> Freeze for GlobalContext<'source, 'temp, 'out>
impl<'source, 'temp, 'out> RefUnwindSafe for GlobalContext<'source, 'temp, 'out>
impl<'source, 'temp, 'out> Send for GlobalContext<'source, 'temp, 'out>
impl<'source, 'temp, 'out> Sync for GlobalContext<'source, 'temp, 'out>
impl<'source, 'temp, 'out> Unpin for GlobalContext<'source, 'temp, 'out>
impl<'source, 'temp, 'out> !UnwindSafe for GlobalContext<'source, 'temp, 'out>
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