[−][src]Enum ucglib::build::ir::Val
The Intermediate representation of a compiled UCG AST.
Variants
EmptyBoolean(bool)Int(i64)Float(f64)Str(String)List(Vec<Rc<Val>>)Tuple(Vec<(String, Rc<Val>)>)Env(Vec<(String, String)>)Func(FuncDef)Module(ModuleDef)Methods
impl Val[src]
pub fn type_name(&self) -> String[src]
Returns the Type of a Val as a string.
pub fn type_equal(&self, target: &Self) -> bool[src]
Returns true if called with a Val of the same type as itself.
pub fn equal(&self, target: &Self) -> Result<bool, BuildError>[src]
pub fn get_fields(&self) -> Option<&Vec<(String, Rc<Val>)>>[src]
Returns the fields if this Val is a tuple. None otherwise.
pub fn is_int(&self) -> bool[src]
pub fn is_empty(&self) -> bool[src]
pub fn is_float(&self) -> bool[src]
pub fn is_string(&self) -> bool[src]
pub fn is_tuple(&self) -> bool[src]
pub fn is_env(&self) -> bool[src]
pub fn is_list(&self) -> bool[src]
pub fn is_bool(&self) -> bool[src]
pub fn is_func(&self) -> bool[src]
pub fn is_str(&self) -> bool[src]
pub fn is_module(&self) -> bool[src]
Trait Implementations
impl Clone for Val[src]
fn clone(&self) -> Val[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq<Val> for Val[src]
impl From<Val> for String[src]
impl From<String> for Val[src]
impl Display for Val[src]
impl Debug for Val[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,