Struct purua::state::LuaState[][src]

pub struct LuaState {
    pub g: Global,
    pub reg: Registry,
    pub frame_stack: Vec<CallFrame>,
}

Fields

g: Globalreg: Registryframe_stack: Vec<CallFrame>

Implementations

impl LuaState[src]

pub fn new(reg_size: usize) -> Self[src]

pub fn arg_int(&self, pos: usize) -> Result<i64, LuaError>[src]

pub fn arg_string(&self, pos: usize) -> Result<String, LuaError>[src]

pub fn arg_value(&self, pos: usize) -> Result<Value, LuaError>[src]

pub fn assign_global(&mut self, name: impl Into<String>, value: Value)[src]

pub fn assign_local(&mut self, name: impl Into<String>, value: Value)[src]

pub fn get_global(&self, name: impl Into<String>) -> Option<Value>[src]

pub fn register_global_fn(&mut self, name: impl Into<String>, func: LuaFn)[src]

pub fn register_global_code(
    &mut self,
    name: impl Into<String>,
    params: Vec<String>,
    block: &Rule
)
[src]

pub fn start_block_raw(&mut self) -> usize[src]

pub fn end_block_raw(&mut self, oldtop: usize) -> LuaResult<()>[src]

pub fn funcall(
    &mut self,
    func: Value,
    params: Vec<Value>
) -> LuaResult<Vec<Value>>
[src]

pub fn global_funcall1(
    &mut self,
    name: impl Into<String>,
    arg1: Value
) -> Result<Value, LuaError>
[src]

pub fn process_op(
    &self,
    op: &char,
    lvalue: Value,
    rvalue: Value
) -> Result<Value, LuaError>
[src]

pub fn process_op_number(
    &self,
    op: &char,
    l: i64,
    r: i64
) -> Result<Value, LuaError>
[src]

pub fn process_op_bool(
    &self,
    op: &char,
    l: bool,
    r: bool
) -> Result<Value, LuaError>
[src]

pub fn process_op_str(
    &self,
    op: &char,
    l: &str,
    r: &str
) -> Result<Value, LuaError>
[src]

pub fn current_frame(&self) -> Option<&CallFrame>[src]

pub fn has_local_name(&self, name: impl Into<String>) -> bool[src]

pub fn get_local(&self, name: impl Into<String>) -> Option<Value>[src]

pub fn set_to_return(&mut self, to_return: bool)[src]

pub fn to_return(&mut self) -> bool[src]

pub fn returns(&mut self, retval: Value)[src]

pub fn error(&self, msg: impl Into<String>) -> LuaError[src]

Auto Trait Implementations

impl !RefUnwindSafe for LuaState

impl !Send for LuaState

impl !Sync for LuaState

impl Unpin for LuaState

impl !UnwindSafe for LuaState

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.