Struct s2n_quic_core::task::cooldown::Cooldown
source · pub struct Cooldown { /* private fields */ }
Implementations§
source§impl Cooldown
impl Cooldown
pub fn new(limit: u16) -> Self
pub fn state(&self) -> Outcome
sourcepub fn on_ready(&mut self)
pub fn on_ready(&mut self)
Notifies the cooldown that the poll operation was ready
This resets the cooldown period until another Pending
result.
sourcepub fn on_pending(&mut self) -> Outcome
pub fn on_pending(&mut self) -> Outcome
Notifies the cooldown that the poll operation was pending
This consumes a cooldown credit until they are exhausted at which point the task should sleep.
pub fn on_pending_task(&mut self, cx: &mut Context<'_>) -> Outcome
pub async fn wrap<F>(&mut self, fut: F) -> F::Output
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cooldown
impl RefUnwindSafe for Cooldown
impl Send for Cooldown
impl Sync for Cooldown
impl Unpin for Cooldown
impl UnwindSafe for Cooldown
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