Struct bastion::io::executor::BastionExecutor [−]
pub struct BastionExecutor;
Expand description
A wrapper around bastion_executor
that implements AgnostikExecutor
and can be used to spawn and run futures using the bastion executor.
Implementations
impl BastionExecutor
impl BastionExecutor
pub const fn new() -> BastionExecutor
pub const fn new() -> BastionExecutor
Create a new BastionExecutor
instance.
Trait Implementations
impl AgnostikExecutor for BastionExecutor
impl AgnostikExecutor for BastionExecutor
Spawns an asynchronous task using the underlying executor.
pub fn spawn_blocking<F, T>(&self, task: F) -> JoinHandle<T>ⓘNotable traits for JoinHandle<R>impl<R> Future for JoinHandle<R> where
R: 'static + Send, type Output = R;
where
F: 'static + FnOnce() -> T + Send,
T: 'static + Send,
pub fn spawn_blocking<F, T>(&self, task: F) -> JoinHandle<T>ⓘNotable traits for JoinHandle<R>impl<R> Future for JoinHandle<R> where
R: 'static + Send, type Output = R;
where
F: 'static + FnOnce() -> T + Send,
T: 'static + Send,
Notable traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
R: 'static + Send, type Output = R;
Runs the provided closure on a thread, which can execute blocking tasks asynchronously.
Auto Trait Implementations
impl RefUnwindSafe for BastionExecutor
impl Send for BastionExecutor
impl Sync for BastionExecutor
impl Unpin for BastionExecutor
impl UnwindSafe for BastionExecutor
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more