pub struct Worker<J> { /* private fields */ }Implementations§
Source§impl<J> Worker<J>
impl<J> Worker<J>
pub fn new(name: &str, buf: usize) -> Self
pub fn with_graceful(self, graceful: bool) -> Self
pub fn with_trigger(self, trigger: (Sender<J>, Receiver<J>)) -> Self
pub fn get_sender(&self) -> Arc<Sender<J>>
pub async fn send(&self, job: J) -> Result<(), SendError<J>>
pub fn name(&self) -> String
pub async fn count(&self) -> usize
pub async fn stop(&self) -> Result<(), SendError<()>>
pub async fn run<F, Fut>(&self, how: F)
Auto Trait Implementations§
impl<J> Freeze for Worker<J>
impl<J> !RefUnwindSafe for Worker<J>
impl<J> Send for Worker<J>where
J: Send,
impl<J> Sync for Worker<J>where
J: Send,
impl<J> Unpin for Worker<J>
impl<J> !UnwindSafe for Worker<J>
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