pub fn poll_expired(
        &mut self,
        cx: &mut task::Context<'_>,
    ) -> Poll<Option<Result<Expired<T>, Error>>> {
        if !self
            .waker
            .as_ref()
            .map(|w| w.will_wake(cx.waker()))
            .unwrap_or(false)
        {
            self.waker = Some(cx.waker().clone());
        }

        let item = ready!(self.poll_idx(cx));
        Poll::Ready(item.map(|result| {
            result.map(|idx| {
                let data = self.slab.remove(idx);
                debug_assert!(data.next.is_none());
                debug_assert!(data.prev.is_none());

                Expired {
                    key: Key::new(idx),
                    data: data.inner,
                    deadline: self.start + Duration::from_millis(data.when),
                }
            })
        }))
    }
/// Attempts to pull out the next value of the delay queue, registering the
/// current task for wakeup if the value is not yet available, and returning
/// `None` if the queue is exhausted.
Attempts to pull out the next value of the delay queue, registering the
current task for wakeup if the value is not yet available, and returning
`None` if the queue is exhausted.
Attempts to pull out the next value of the delay queue registering the current task for wakeup if the value is not yet available and returning ` None ` if the queue is exhausted .
pub fn poll_expired(
        &mut self,
        cx: &mut task::Context<'_>,
    ) -> Poll<Option<Result<Expired<T>, Error>>> {
        if !self
            .waker
            .as_ref()
            .map(|w| w.will_wake(cx.waker()))
            .unwrap_or(false)
        {
            self.waker = Some(cx.waker().clone());
        }
        let item = ready!(self.poll_idx(cx));
        Poll::Ready(item.map(|result| {
            result.map(|idx| {
                let data = self.slab.remove(idx);
                debug_assert!(data.next.is_none());
                debug_assert!(data.prev.is_none());
                Expired {
                    key: Key::new(idx),
                    data: data.inner,
                    deadline: self.start + Duration::from_millis(data.when),
                }
            })
        }))
    }
pub fn poll_expired ( & mut self , cx : & mut task :: Context < ' _ > , ) -> Poll < Option < Result < Expired < T > , Error > > > { if ! self . waker . as_ref ( ) . map ( | w | w . will_wake ( cx . waker ( ) ) ) . unwrap_or ( false ) { self . waker = Some ( cx . waker ( ) . clone ( ) ) ; } let item = ready ! ( self poll_idx ( cx ) ) ; Poll :: Ready ( item . map ( | result | { result . map ( | idx | { let data = self . slab . remove ( idx ) ; debug_assert ! ( data next is_none ( ) ) ; debug_assert ! ( data prev is_none ( ) ) ; Expired { key : Key :: new ( idx ) , data : data . inner , deadline : self . start + Duration :: from_millis ( data . when ) , } } ) } ) ) }
Attempts to pull out the next value of the delay queue, registering the
current task for wakeup if the value is not yet available, and returning
`None` if the queue is exhausted.
Attempts to pull out the next value of the delay queue registering the current task for wakeup if the value is not yet available and returning ` None ` if the queue is exhausted .
&mut self
cx
&mut task::Context<'_>