Struct preserves_schema::compiler::context::FunctionContext
source · pub struct FunctionContext<'a, 'm, 'b> {
pub error_context: String,
pub m: &'a mut ModuleContext<'m, 'b>,
pub temp_counter: usize,
pub captures: Vec<Capture>,
pub capture_mode: CaptureMode,
}
Fields§
§error_context: String
§m: &'a mut ModuleContext<'m, 'b>
§temp_counter: usize
§captures: Vec<Capture>
§capture_mode: CaptureMode
Implementations§
source§impl<'a, 'm, 'b> FunctionContext<'a, 'm, 'b>
impl<'a, 'm, 'b> FunctionContext<'a, 'm, 'b>
pub fn new(m: &'a mut ModuleContext<'m, 'b>, error_context: &str) -> Self
pub fn capture(&mut self, field_name: String, ty: TField, source_expr: String)
pub fn lookup_capture(&self, field_name: &str) -> &Capture
pub fn gentempname(&mut self) -> String
pub fn declare_compound( &self, body: &mut Vec<Item>, name: &str, init_expr: Item )
pub fn define_atom(&mut self, body: &mut Vec<Item>, name: &str, val_expr: Item)
pub fn with_definite_mode<R, F: FnOnce(&mut Self) -> R>(&mut self, f: F) -> R
pub fn with_indefinite_mode<F: FnOnce(&mut Self)>(&mut self, f: F) -> Vec<Item>
pub fn branch<R, F: FnOnce(&mut Self) -> R>(&mut self, f: F) -> R
pub fn err_code(&self) -> Item
pub fn fully_qualified_error_context(&self) -> String
pub fn conformance_err_code(&self) -> Item
Auto Trait Implementations§
impl<'a, 'm, 'b> Freeze for FunctionContext<'a, 'm, 'b>
impl<'a, 'm, 'b> !RefUnwindSafe for FunctionContext<'a, 'm, 'b>
impl<'a, 'm, 'b> !Send for FunctionContext<'a, 'm, 'b>
impl<'a, 'm, 'b> !Sync for FunctionContext<'a, 'm, 'b>
impl<'a, 'm, 'b> Unpin for FunctionContext<'a, 'm, 'b>
impl<'a, 'm, 'b> !UnwindSafe for FunctionContext<'a, '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