[][src]Struct mtots::Eval

pub struct Eval {}

Implementations

impl Eval[src]

pub fn classof(
    globals: &'a mut Globals,
    value: &'a Value
) -> Result<&'a Rc<Class>, ErrorIndicator>
[src]

pub fn expect_int(
    globals: &mut Globals,
    value: &Value
) -> Result<i64, ErrorIndicator>
[src]

pub fn expect_index(
    globals: &mut Globals,
    value: &Value,
    len: usize
) -> Result<usize, ErrorIndicator>
[src]

pub fn expect_float(
    globals: &mut Globals,
    value: &Value
) -> Result<f64, ErrorIndicator>
[src]

pub fn expect_floatlike(
    globals: &mut Globals,
    value: &Value
) -> Result<f64, ErrorIndicator>
[src]

pub fn expect_symbol(
    globals: &mut Globals,
    value: &Value
) -> Result<Symbol, ErrorIndicator>
[src]

pub fn expect_symbollike(
    globals: &mut Globals,
    value: &Value
) -> Result<Symbol, ErrorIndicator>
[src]

pub fn expect_string(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a RcStr, ErrorIndicator>
[src]

pub fn move_string_or_clone(
    globals: &mut Globals,
    value: Value
) -> Result<String, ErrorIndicator>
[src]

pub fn expect_bytes(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a Vec<u8>, ErrorIndicator>
[src]

pub fn expect_path(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a RcPath, ErrorIndicator>
[src]

pub fn expect_pathlike(
    globals: &mut Globals,
    value: &Value
) -> Result<RcPath, ErrorIndicator>
[src]

pub fn expect_list(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a Vec<Value>, ErrorIndicator>
[src]

pub fn try_move_list(
    globals: &mut Globals,
    value: Value
) -> Result<Option<Vec<Value>>, ErrorIndicator>
[src]

Expects the given value to be the only holder of a list -- and moves the vector out

pub fn move_list(
    globals: &mut Globals,
    value: Value
) -> Result<Vec<Value>, ErrorIndicator>
[src]

pub fn expect_table(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a Table, ErrorIndicator>
[src]

pub fn move_table_or_clone(
    globals: &mut Globals,
    value: Value
) -> Result<Table, ErrorIndicator>
[src]

pub fn try_move_table(
    globals: &mut Globals,
    value: Value
) -> Result<Option<Table>, ErrorIndicator>
[src]

pub fn move_table(
    globals: &mut Globals,
    value: Value
) -> Result<Table, ErrorIndicator>
[src]

pub fn expect_map(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a GMap<Globals, Value, Value, Eval, Eval, ErrorIndicator>, ErrorIndicator>
[src]

pub fn move_exc(
    globals: &mut Globals,
    value: Value
) -> Result<Exception, ErrorIndicator>
[src]

pub fn expect_module(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a Rc<Module>, ErrorIndicator>
[src]

pub fn expect_opaque<T>(
    globals: &mut Globals,
    value: &'a Value
) -> Result<Ref<'a, T>, ErrorIndicator> where
    T: 'static, 
[src]

pub fn move_opaque<T>(
    globals: &mut Globals,
    value: &'a Value
) -> Result<T, ErrorIndicator> where
    T: 'static, 
[src]

pub fn expect_mutable_string(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a Rc<RefCell<String>>, ErrorIndicator>
[src]

pub fn expect_mutable_list(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a Rc<RefCell<Vec<Value>>>, ErrorIndicator>
[src]

pub fn expect_mutable_map(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a Rc<RefCell<GMap<Globals, Value, Value, Eval, Eval, ErrorIndicator>>>, ErrorIndicator>
[src]

pub fn expect_class(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a Rc<Class>, ErrorIndicator>
[src]

pub fn expect_exception_kind(
    globals: &mut Globals,
    value: &'a Value
) -> Result<&'a Rc<ExceptionKind>, ErrorIndicator>
[src]

pub fn try_<T, E>(
    globals: &mut Globals,
    result: Result<T, E>
) -> Result<T, ErrorIndicator> where
    E: Into<EvalError>, 
[src]

pub fn osstr_to_str(
    globals: &mut Globals,
    osstr: &'a OsStr
) -> Result<&'a str, ErrorIndicator>
[src]

pub fn truthy(
    globals: &mut Globals,
    value: &Value
) -> Result<bool, ErrorIndicator>
[src]

pub fn truthy0(
    globals: &mut Globals,
    value: &Value,
    Option<(&Code, usize)>
) -> Result<bool, ErrorIndicator>
[src]

Verison of truthy that will accept an optional debuginfo argument This is so that we only add debug information to the stacktrace if we need to make a jump. If we don't need to make a jump, the globals.trace_push/trace_pop might cost as much as the operation itself

pub fn eq(
    globals: &mut Globals,
    a: &Value,
    b: &Value
) -> Result<bool, ErrorIndicator>
[src]

pub fn eq0(
    globals: &mut Globals,
    a: &Value,
    b: &Value,
    debuginfo: Option<(&Code, usize)>
) -> Result<bool, ErrorIndicator>
[src]

Verison of eq that will accept an optional debuginfo argument This is so that we only add debug information to the stacktrace if we need to make a jump. If we don't need to make a jump, the globals.trace_push/trace_pop might cost as much as the comparison itself

pub fn neg(globals: &mut Globals, x: &Value) -> Result<Value, ErrorIndicator>[src]

pub fn pos(globals: &mut Globals, x: &Value) -> Result<Value, ErrorIndicator>[src]

pub fn lt(
    globals: &mut Globals,
    a: &Value,
    b: &Value
) -> Result<bool, ErrorIndicator>
[src]

pub fn hash(globals: &mut Globals, x: &Value) -> Result<u64, ErrorIndicator>[src]

pub fn add(
    globals: &mut Globals,
    a: Value,
    b: Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn add0(
    globals: &mut Globals,
    a: Value,
    b: Value,
    debuginfo: Option<(&Code, usize)>
) -> Result<Value, ErrorIndicator>
[src]

pub fn sub(
    globals: &mut Globals,
    a: Value,
    b: Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn sub0(
    globals: &mut Globals,
    a: Value,
    b: Value,
    debuginfo: Option<(&Code, usize)>
) -> Result<Value, ErrorIndicator>
[src]

pub fn mul(
    globals: &mut Globals,
    a: Value,
    b: Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn mul0(
    globals: &mut Globals,
    a: Value,
    b: Value,
    debuginfo: Option<(&Code, usize)>
) -> Result<Value, ErrorIndicator>
[src]

pub fn div(
    globals: &mut Globals,
    a: Value,
    b: Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn div0(
    globals: &mut Globals,
    a: Value,
    b: Value,
    debuginfo: Option<(&Code, usize)>
) -> Result<Value, ErrorIndicator>
[src]

pub fn floordiv(
    globals: &mut Globals,
    a: Value,
    b: Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn floordiv0(
    globals: &mut Globals,
    a: Value,
    b: Value,
    debuginfo: Option<(&Code, usize)>
) -> Result<Value, ErrorIndicator>
[src]

pub fn mod_(
    globals: &mut Globals,
    a: Value,
    b: Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn mod0(
    globals: &mut Globals,
    a: Value,
    b: Value,
    debuginfo: Option<(&Code, usize)>
) -> Result<Value, ErrorIndicator>
[src]

pub fn truncdiv(
    globals: &mut Globals,
    a: Value,
    b: Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn truncdiv0(
    globals: &mut Globals,
    a: Value,
    b: Value,
    debuginfo: Option<(&Code, usize)>
) -> Result<Value, ErrorIndicator>
[src]

pub fn rem(
    globals: &mut Globals,
    a: Value,
    b: Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn rem0(
    globals: &mut Globals,
    a: Value,
    b: Value,
    debuginfo: Option<(&Code, usize)>
) -> Result<Value, ErrorIndicator>
[src]

pub fn call(
    globals: &mut Globals,
    f: &Value,
    args: Vec<Value>
) -> Result<Value, ErrorIndicator>
[src]

pub fn call_with_kwargs(
    globals: &mut Globals,
    f: &Value,
    args: Vec<Value>,
    kwargs: Option<HashMap<Symbol, Value, RandomState>>
) -> Result<Value, ErrorIndicator>
[src]

pub fn mcall(
    globals: &mut Globals,
    owner: &Value,
    name: Symbol,
    args: Vec<Value>
) -> Result<Value, ErrorIndicator>
[src]

pub fn get_method(
    globals: &mut Globals,
    owner: &Value,
    name: Symbol
) -> Result<Value, ErrorIndicator>
[src]

pub fn sort(
    globals: &mut Globals,
    vec: &mut [Value]
) -> Result<(), ErrorIndicator>
[src]

pub fn str(
    globals: &mut Globals,
    value: &Value
) -> Result<RcStr, ErrorIndicator>
[src]

pub fn repr(
    globals: &mut Globals,
    value: &Value
) -> Result<RcStr, ErrorIndicator>
[src]

pub fn getattr(&mut Globals, owner: &Value, name: Symbol) -> Option<Value>[src]

pub fn setattr(
    &mut Globals,
    _owner: &Value,
    _name: Symbol,
    _value: Value
) -> Result<(), ()>
[src]

pub fn get_static_attr(
    &mut Globals,
    owner: &Value,
    name: Symbol
) -> Option<Value>
[src]

pub fn get_static_attr_or_err(
    globals: &mut Globals,
    owner: &Value,
    name: Symbol
) -> Result<Value, ErrorIndicator>
[src]

pub fn call_static_attr(
    globals: &mut Globals,
    owner: &Value,
    name: Symbol,
    args: Vec<Value>
) -> Result<Value, ErrorIndicator>
[src]

pub fn iter(
    globals: &mut Globals,
    iterable: &Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn next(
    globals: &mut Globals,
    iterator: &Value
) -> Result<Option<Value>, ErrorIndicator>
[src]

pub fn resume(
    globals: &mut Globals,
    iterator: &Value,
    value: Value
) -> GeneratorResult
[src]

pub fn list_from_iterable(
    globals: &mut Globals,
    iterable: &Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn map_from_iterable(
    globals: &mut Globals,
    pairs: &Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn mutable_list_from_iterable(
    globals: &mut Globals,
    iterable: &Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn mutable_map_from_iterable(
    globals: &mut Globals,
    iterable: &Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn from_iterable(
    globals: &mut Globals,
    type_: &Value,
    iterable: Value
) -> Result<Value, ErrorIndicator>
[src]

pub fn extend_from_iterable(
    globals: &mut Globals,
    vec: &mut Vec<Value>,
    iterable: &Value
) -> Result<(), ErrorIndicator>
[src]

pub fn extend_str(
    globals: &mut Globals,
    s: &mut String,
    strlike: &Value
) -> Result<(), ErrorIndicator>
[src]

pub fn iterable_to_vec(
    globals: &mut Globals,
    iterable: &Value
) -> Result<Vec<Value>, ErrorIndicator>
[src]

pub fn iterable_to_vmap(
    globals: &mut Globals,
    pairs: &Value
) -> Result<GMap<Globals, Value, Value, Eval, Eval, ErrorIndicator>, ErrorIndicator>
[src]

pub fn unpack(
    globals: &mut Globals,
    iterable: &Value,
    n: usize
) -> Result<Vec<Value>, ErrorIndicator>
[src]

Auto Trait Implementations

impl RefUnwindSafe for Eval

impl Send for Eval

impl Sync for Eval

impl Unpin for Eval

impl UnwindSafe for Eval

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.