Struct mlua::OwnedThread
source · pub struct OwnedThread(_, _);
Available on crate feature
unstable
only.Expand description
Owned handle to an internal Lua thread (coroutine).
The owned handle holds a strong reference to the current Lua instance.
Be warned, if you place it into a Lua type (eg. UserData
or a Rust callback), it is very easy
to accidentally cause reference cycles that would prevent destroying Lua instance.
Implementations§
source§impl OwnedThread
impl OwnedThread
source§impl OwnedThread
impl OwnedThread
sourcepub fn resume<'lua, A, R>(&'lua self, args: A) -> Result<R>where
A: IntoLuaMulti<'lua>,
R: FromLuaMulti<'lua>,
pub fn resume<'lua, A, R>(&'lua self, args: A) -> Result<R>where A: IntoLuaMulti<'lua>, R: FromLuaMulti<'lua>,
Resumes execution of this thread.
See Thread::resume()
for more details.
sourcepub fn status(&self) -> ThreadStatus
pub fn status(&self) -> ThreadStatus
Gets the status of the thread.
Trait Implementations§
source§impl Clone for OwnedThread
impl Clone for OwnedThread
source§fn clone(&self) -> OwnedThread
fn clone(&self) -> OwnedThread
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for OwnedThread
impl !Send for OwnedThread
impl !Sync for OwnedThread
impl Unpin for OwnedThread
impl !UnwindSafe for OwnedThread
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