pub struct BlockingExecutor { /* private fields */ }Expand description
An executor that uses spawn_blocking for blocking operations.
This is useful for services that perform blocking I/O or CPU-intensive work that would block the async runtime.
§Example
use tower_resilience_executor::BlockingExecutor;
use tokio::runtime::Handle;
let executor = BlockingExecutor::new(Handle::current());Implementations§
Trait Implementations§
Source§impl Clone for BlockingExecutor
impl Clone for BlockingExecutor
Source§fn clone(&self) -> BlockingExecutor
fn clone(&self) -> BlockingExecutor
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for BlockingExecutor
impl RefUnwindSafe for BlockingExecutor
impl Send for BlockingExecutor
impl Sync for BlockingExecutor
impl Unpin for BlockingExecutor
impl UnsafeUnpin for BlockingExecutor
impl UnwindSafe for BlockingExecutor
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