pub struct InterpreterStack {
pub stack: Vec<RibInterpreterStackValue>,
}Fields§
§stack: Vec<RibInterpreterStackValue>Implementations§
Source§impl InterpreterStack
impl InterpreterStack
pub fn new() -> Self
pub fn create_record(&mut self, fields: Vec<NameTypePair>)
pub fn pop(&mut self) -> Option<RibInterpreterStackValue>
pub fn try_pop(&mut self) -> RibInterpreterResult<RibInterpreterStackValue>
pub fn pop_sink(&mut self) -> Option<(Vec<ValueAndType>, WitType)>
pub fn pop_n(&mut self, n: usize) -> Option<Vec<RibInterpreterStackValue>>
pub fn try_pop_n( &mut self, n: usize, ) -> RibInterpreterResult<Vec<RibInterpreterStackValue>>
pub fn try_pop_n_val( &mut self, n: usize, ) -> RibInterpreterResult<Vec<ValueAndType>>
pub fn pop_str(&mut self) -> Option<String>
pub fn pop_val(&mut self) -> Option<ValueAndType>
pub fn try_pop_val(&mut self) -> RibInterpreterResult<ValueAndType>
pub fn try_pop_record( &mut self, ) -> RibInterpreterResult<(Vec<Value>, TypeRecord)>
pub fn try_pop_bool(&mut self) -> RibInterpreterResult<bool>
pub fn push(&mut self, interpreter_result: RibInterpreterStackValue)
pub fn create_sink(&mut self, analysed_type: WitType)
pub fn push_val(&mut self, element: ValueAndType)
pub fn push_to_sink( &mut self, value_and_type: ValueAndType, ) -> RibInterpreterResult<()>
pub fn push_variant( &mut self, variant_name: String, optional_variant_value: Option<Value>, cases: Vec<NameOptionTypePair>, ) -> RibInterpreterResult<()>
pub fn push_enum( &mut self, enum_name: String, cases: Vec<String>, ) -> RibInterpreterResult<()>
pub fn push_some(&mut self, inner_element: Value, inner_type: &WitType)
pub fn push_none(&mut self, analysed_type: Option<WitType>)
pub fn push_ok( &mut self, inner_element: Value, ok_type: Option<&WitType>, err_type: Option<&WitType>, )
pub fn push_err( &mut self, inner_element: Value, ok_type: Option<&WitType>, err_type: Option<&WitType>, )
pub fn push_list(&mut self, values: Vec<Value>, list_elem_type: &WitType)
pub fn push_tuple(&mut self, values: Vec<ValueAndType>)
Trait Implementations§
Source§impl Debug for InterpreterStack
impl Debug for InterpreterStack
Auto Trait Implementations§
impl Freeze for InterpreterStack
impl !RefUnwindSafe for InterpreterStack
impl Send for InterpreterStack
impl Sync for InterpreterStack
impl Unpin for InterpreterStack
impl UnsafeUnpin for InterpreterStack
impl !UnwindSafe for InterpreterStack
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