You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: future.rs
    path of file: ./repos/linkerd2-proxy/linkerd/proxy/balance/queue/src
    
    the code of the file until where you have to start completion: use super::message;
use futures::ready;
use linkerd_error::Error;
use pin_project::pin_project;
use std::{
    future::Future,
    pin::Pin,
    task::{Context, Poll},
};

#[pin_project]
/// Future that completes when the buffered service eventually services the submitted request.
#[derive(Debug)]
pub struct ResponseFuture<T> {
    #[pin]
    state: ResponseState<T>,
}

#[pin_project(project = ResponseStateProj)]
#[derive(Debug)]
enum ResponseState<T> {
    Failed {
        error: Option<Error>,
    },
    Rx {
        #[pin]
   
    
    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
        let mut this = self.project();

        loop {
            match this.state.as_mut().project() {
                ResponseStateProj::Failed { error } => {
                    return Poll::Ready(Err(error.take().expect("polled after error")));
                }
                ResponseStateProj::Rx { rx } => {
                    let fut = ready!(rx.poll(cx))
                        .expect("worker must set a failure if it exits prematurely")?;
                    this.state.set(ResponseState::Poll { fut });
                }
                ResponseStateProj::Poll { fut } => return fut.poll(cx).map_err(Into::into),
            }
        }
    }