Struct preserves_schema::compiler::context::BundleContext
source · pub struct BundleContext<'b> {
pub config: &'b CompilerConfig,
pub types: Map<Ref, TDefinition>,
pub literals: Map<IOValue, String>,
}
Fields§
§config: &'b CompilerConfig
§types: Map<Ref, TDefinition>
§literals: Map<IOValue, String>
Implementations§
source§impl<'b> BundleContext<'b>
impl<'b> BundleContext<'b>
pub fn new(config: &'b CompilerConfig) -> Self
pub fn any_type(&self) -> &'static str
pub fn lookup_definition(&self, r: &Ref) -> Option<(&Definition, Purpose)>
pub fn type_for_name(&self, r: &Ref) -> Option<&TDefinition>
pub fn define_literal(&mut self, v: &IOValue) -> String
pub fn generate_module<F: FnOnce(&mut ModuleContext<'_, '_>)>( &mut self, path: &Vec<String>, schema: &Schema, mode: ModuleContextMode, items: &mut Map<ModuleContextMode, Vec<Item>>, f: F )
pub fn language_struct_name(&self) -> &'static str
pub fn language_type_base(&self) -> String
pub fn language_type(&self) -> String
Auto Trait Implementations§
impl<'b> Freeze for BundleContext<'b>
impl<'b> !RefUnwindSafe for BundleContext<'b>
impl<'b> !Send for BundleContext<'b>
impl<'b> !Sync for BundleContext<'b>
impl<'b> Unpin for BundleContext<'b>
impl<'b> !UnwindSafe for BundleContext<'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