Struct task_stream::Executor
source · [−]pub struct Executor<const N: usize> { /* private fields */ }
Implementations
sourceimpl<const N: usize> Executor<N>
impl<const N: usize> Executor<N>
pub const fn new() -> Self
pub fn spawn<F>(&'static self, future: F) where
F: Future + Send + 'static,
F::Output: Send + 'static,
sourcepub unsafe fn spawn_local<F>(&self, future: F) where
F: Future + 'static,
F::Output: 'static,
pub unsafe fn spawn_local<F>(&self, future: F) where
F: Future + 'static,
F::Output: 'static,
Safety
- TaskStream must be used on the original thread.
pub fn stream(&self) -> TaskStream<'_, N>
Auto Trait Implementations
impl<const N: usize> !RefUnwindSafe for Executor<N>
impl<const N: usize> Send for Executor<N>
impl<const N: usize> Sync for Executor<N>
impl<const N: usize> Unpin for Executor<N>
impl<const N: usize> UnwindSafe for Executor<N>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more