pub struct DefaultExecutor { /* private fields */ }
Implementations§
Source§impl DefaultExecutor
impl DefaultExecutor
pub fn new(rt: Handle) -> DefaultExecutor
Trait Implementations§
Source§impl Clone for DefaultExecutor
impl Clone for DefaultExecutor
Source§fn clone(&self) -> DefaultExecutor
fn clone(&self) -> DefaultExecutor
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 moreSource§impl Executor for DefaultExecutor
impl Executor for DefaultExecutor
Source§fn spawn<F>(&self, future: F) -> impl JoinHandle<F::Output>
fn spawn<F>(&self, future: F) -> impl JoinHandle<F::Output>
spawns the task to run in background, and returns a join handle
where the future’s result can be awaited.
If the future panics, the join handle should return an error code.
This is primarily used by mssf Bridge to execute user app async callbacks/notifications.
User app impl future may panic, and mssf propagates panic as an error in JoinHandle
to SF.
Source§fn block_on<F: Future>(&self, future: F) -> F::Output
fn block_on<F: Future>(&self, future: F) -> F::Output
run the future on the executor until completion.
Source§fn run_until_ctrl_c(&self)
fn run_until_ctrl_c(&self)
Run the executor and block the current thread until ctrl-c event is
Received.
Auto Trait Implementations§
impl Freeze for DefaultExecutor
impl !RefUnwindSafe for DefaultExecutor
impl Send for DefaultExecutor
impl Sync for DefaultExecutor
impl Unpin for DefaultExecutor
impl !UnwindSafe for DefaultExecutor
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