pub enum LuaResult {
Values(Vec<Value>),
Return(Vec<Value>),
Break,
}Expand description
Result of evaluating a Lua core form.
Variants§
Values(Vec<Value>)
Ordinary expression values.
Return(Vec<Value>)
Values carried by a Lua return form.
Break
Non-local exit carried by a Lua break form.
Implementations§
Source§impl LuaResult
impl LuaResult
Sourcepub fn return_values(values: Vec<Value>) -> Self
pub fn return_values(values: Vec<Value>) -> Self
Build returned values.
Sourcepub fn break_signal() -> Self
pub fn break_signal() -> Self
Build a break result.
Sourcepub fn values_ref(&self) -> &[Value]
pub fn values_ref(&self) -> &[Value]
Borrow the contained values.
Sourcepub fn into_values(self) -> Vec<Value>
pub fn into_values(self) -> Vec<Value>
Consume the result and return its values.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for LuaResult
impl !UnwindSafe for LuaResult
impl Freeze for LuaResult
impl Send for LuaResult
impl Sync for LuaResult
impl Unpin for LuaResult
impl UnsafeUnpin for LuaResult
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