Struct preserves_schema::compiler::context::ModuleContext
source · pub struct ModuleContext<'m, 'b> {
pub bundle: &'m mut BundleContext<'b>,
pub module_path: ModulePath,
pub schema: &'m Schema,
pub typedefs: Vec<Item>,
pub functiondefs: Vec<Item>,
pub mode: ModuleContextMode,
}
Fields§
§bundle: &'m mut BundleContext<'b>
§module_path: ModulePath
§schema: &'m Schema
§typedefs: Vec<Item>
§functiondefs: Vec<Item>
§mode: ModuleContextMode
Implementations§
source§impl<'m, 'b> ModuleContext<'m, 'b>
impl<'m, 'b> ModuleContext<'m, 'b>
pub fn new( bundle: &'m mut BundleContext<'b>, module_path: &ModulePath, schema: &'m Schema, mode: ModuleContextMode ) -> Self
pub fn any_type(&self) -> &'static str
pub fn reset_mode(&mut self)
pub fn define_literal(&mut self, v: &IOValue) -> String
pub fn define_type(&mut self, i: Item)
pub fn define_function<F: FnOnce(FunctionContext<'_, '_, '_>) -> Item>( &mut self, error_context: &str, f: F )
pub fn render_ref(&self, r: &Ref, style: RefRenderStyle) -> Item
pub fn ref_has_embedded(&self, r: &Ref) -> bool
pub fn parse_unparse_generic_decls(&self, ty: &TDefinition) -> Item
pub fn extract(&mut self) -> Vec<Item>
Auto Trait Implementations§
impl<'m, 'b> Freeze for ModuleContext<'m, 'b>
impl<'m, 'b> !RefUnwindSafe for ModuleContext<'m, 'b>
impl<'m, 'b> !Send for ModuleContext<'m, 'b>
impl<'m, 'b> !Sync for ModuleContext<'m, 'b>
impl<'m, 'b> Unpin for ModuleContext<'m, 'b>
impl<'m, 'b> !UnwindSafe for ModuleContext<'m, 'b>
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