tlsn_prover/
future.rs
1use super::{state, Prover, ProverControl, ProverError};
4use futures::Future;
5use std::pin::Pin;
6
7pub struct ProverFuture {
9 #[allow(clippy::type_complexity)]
10 pub(crate) fut:
11 Pin<Box<dyn Future<Output = Result<Prover<state::Closed>, ProverError>> + Send + 'static>>,
12 pub(crate) ctrl: ProverControl,
13}
14
15impl ProverFuture {
16 pub fn control(&self) -> ProverControl {
18 self.ctrl.clone()
19 }
20}
21
22impl Future for ProverFuture {
23 type Output = Result<Prover<state::Closed>, ProverError>;
24
25 fn poll(
26 mut self: Pin<&mut Self>,
27 cx: &mut std::task::Context<'_>,
28 ) -> std::task::Poll<Self::Output> {
29 self.fut.as_mut().poll(cx)
30 }
31}