Struct rust_box::task_executor::Executor  
source · [−]pub struct Executor<Tx = Sender<((), Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)>, G = (), D = ()> { /* private fields */ }Implementations
sourceimpl<Tx, G, D> Executor<Tx, G, D>where
    Tx: 'static + Clone + Sink<(D, Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)> + Unpin + Send + Sync,
    G: 'static + Hash + Eq + Clone + Debug + Send + Sync,
 
impl<Tx, G, D> Executor<Tx, G, D>where
    Tx: 'static + Clone + Sink<(D, Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)> + Unpin + Send + Sync,
    G: 'static + Hash + Eq + Clone + Debug + Send + Sync,
pub fn spawn_with<T>(&mut self, msg: T, name: D) -> Spawner<'_, T, Tx, G, D>ⓘNotable traits for Spawner<'_, Item, Tx, G, D>impl<Item, Tx, G, D> Future for Spawner<'_, Item, Tx, G, D>where
    Item: 'static + Future + Send,
    Tx: 'static + Clone + Unpin + Sink<(D, Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)> + Send + Sync,
    G: 'static + Hash + Eq + Clone + Debug + Send + Sync,
    <Item as Future>::Output: 'static,
    <Item as Future>::Output: Send,    type Output = Result<(), Error<Item>>;where
    D: Clone,
    T: 'static + Future + Send,
    <T as Future>::Output: 'static,
    <T as Future>::Output: Send,
Item: 'static + Future + Send,
Tx: 'static + Clone + Unpin + Sink<(D, Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)> + Send + Sync,
G: 'static + Hash + Eq + Clone + Debug + Send + Sync,
<Item as Future>::Output: 'static,
<Item as Future>::Output: Send, type Output = Result<(), Error<Item>>;
pub fn flush(&self) -> Flush<Tx, D>
pub fn close(&self) -> Close<Tx, D>
pub fn workers(&self) -> usize
pub fn active_count(&self) -> isize
pub fn waiting_count(&self) -> isize
pub fn completed_count(&self) -> isize
pub fn is_full(&self) -> bool
pub fn is_closed(&self) -> bool
pub fn is_flushing(&self) -> bool
sourceimpl<Tx, G> Executor<Tx, G, ()>where
    Tx: 'static + Clone + Sink<((), Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)> + Unpin + Send + Sync,
    G: 'static + Hash + Eq + Clone + Debug + Send + Sync,
 
impl<Tx, G> Executor<Tx, G, ()>where
    Tx: 'static + Clone + Sink<((), Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)> + Unpin + Send + Sync,
    G: 'static + Hash + Eq + Clone + Debug + Send + Sync,
pub fn spawn<T>(&mut self, msg: T) -> Spawner<'_, T, Tx, G, ()>ⓘNotable traits for Spawner<'_, Item, Tx, G, D>impl<Item, Tx, G, D> Future for Spawner<'_, Item, Tx, G, D>where
    Item: 'static + Future + Send,
    Tx: 'static + Clone + Unpin + Sink<(D, Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)> + Send + Sync,
    G: 'static + Hash + Eq + Clone + Debug + Send + Sync,
    <Item as Future>::Output: 'static,
    <Item as Future>::Output: Send,    type Output = Result<(), Error<Item>>;where
    T: 'static + Future + Send,
    <T as Future>::Output: 'static,
    <T as Future>::Output: Send,
Item: 'static + Future + Send,
Tx: 'static + Clone + Unpin + Sink<(D, Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)> + Send + Sync,
G: 'static + Hash + Eq + Clone + Debug + Send + Sync,
<Item as Future>::Output: 'static,
<Item as Future>::Output: Send, type Output = Result<(), Error<Item>>;
Trait Implementations
Auto Trait Implementations
impl<Tx = Sender<((), Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)>, G = (), D = ()> !RefUnwindSafe for Executor<Tx, G, D>
impl<Tx, G, D> Send for Executor<Tx, G, D>where
    D: Send,
    G: Send + Sync,
    Tx: Send,
impl<Tx, G, D> Sync for Executor<Tx, G, D>where
    D: Sync,
    G: Send + Sync,
    Tx: Sync,
impl<Tx, G, D> Unpin for Executor<Tx, G, D>where
    D: Unpin,
    Tx: Unpin,
impl<Tx = Sender<((), Box<dyn Future<Output = ()> + Send + Unpin + 'static, Global>)>, G = (), D = ()> !UnwindSafe for Executor<Tx, G, D>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    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