pub struct TaskCall { /* private fields */ }Expand description
One import-task call in flight.
Implementations§
Source§impl TaskCall
impl TaskCall
Sourcepub fn new(call: impl FnOnce() -> i32 + 'static) -> Option<TaskCall>
pub fn new(call: impl FnOnce() -> i32 + 'static) -> Option<TaskCall>
Prepares call (the C import, returning its int) to run on its own
stack at the first Self::poll. None when no stack can be mapped.
Sourcepub fn poll(&mut self) -> CallPoll
pub fn poll(&mut self) -> CallPoll
Runs the call until it finishes or blocks in an export task.
Sourcepub fn disable(&mut self)
pub fn disable(&mut self)
Marks the call disabled (35.9): the blocked export call returns
EXPORT_CALL_DISABLED on the next Self::poll, and every export
the C code calls after that returns it at once.
Sourcepub fn import_name(&self) -> String
pub fn import_name(&self) -> String
The SV name of the import task this call runs (set while it is inside the call, empty for a call outside any import task).
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Whether the C function has returned.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TaskCall
impl !Sync for TaskCall
impl !UnwindSafe for TaskCall
impl Freeze for TaskCall
impl Unpin for TaskCall
impl UnsafeUnpin for TaskCall
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