pub struct Thread { /* private fields */ }Implementations§
Source§impl Thread
impl Thread
Sourcepub fn to_pointer(&self) -> Result<usize>
pub fn to_pointer(&self) -> Result<usize>
A stable identity token for this thread. See Table::to_pointer.
Sourcepub fn resume<A, R>(&self, args: A) -> Result<R>where
A: IntoLuaMulti,
R: FromLuaMulti,
pub fn resume<A, R>(&self, args: A) -> Result<R>where
A: IntoLuaMulti,
R: FromLuaMulti,
Resume this coroutine with args, as if by coroutine.resume(self, ...). On a normal yield or return, the yielded/returned values are
converted to R. If the coroutine raises, the error is returned as an
Err carrying the Lua error value — matching the false, err form
coroutine.resume produces, surfaced here as a Result.
Sourcepub fn status(&self) -> Result<ThreadStatus>
pub fn status(&self) -> Result<ThreadStatus>
This coroutine’s lifecycle state, as coroutine.status(self) reports it.
Trait Implementations§
impl Eq for Thread
Auto Trait Implementations§
impl !RefUnwindSafe for Thread
impl !Send for Thread
impl !Sync for Thread
impl !UnwindSafe for Thread
impl Freeze for Thread
impl Unpin for Thread
impl UnsafeUnpin for Thread
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