pub struct PollContext { /* private fields */ }Expand description
Context provided to the polling strategies Includes the worker context and a reference to the previous count of tasks received
Implementations§
Source§impl PollContext
impl PollContext
Sourcepub fn new(worker: WorkerContext, prev_count: Arc<AtomicUsize>) -> Self
pub fn new(worker: WorkerContext, prev_count: Arc<AtomicUsize>) -> Self
Create a new PollContext
Sourcepub fn worker(&self) -> &WorkerContext ⓘ
pub fn worker(&self) -> &WorkerContext ⓘ
Get a reference to the worker context
Sourcepub fn prev_count(&self) -> &Arc<AtomicUsize>
pub fn prev_count(&self) -> &Arc<AtomicUsize>
Get a reference to the previous count of tasks received
Trait Implementations§
Source§impl Clone for PollContext
impl Clone for PollContext
Source§fn clone(&self) -> PollContext
fn clone(&self) -> PollContext
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 PollContext
impl !RefUnwindSafe for PollContext
impl Send for PollContext
impl Sync for PollContext
impl Unpin for PollContext
impl !UnwindSafe for PollContext
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