1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//! HTTP prover state.

use tlsn_formats::http::HttpTranscript;

use crate::tls::{state as prover_state, Prover};

/// The state of an HTTP prover
pub trait State: sealed::Sealed {}

/// Connection closed state.
pub struct Closed {
    pub(super) prover: Prover<prover_state::Closed>,
    pub(super) transcript: HttpTranscript,
}

/// Notarizing state.
pub struct Notarize {
    pub(super) prover: Prover<prover_state::Notarize>,
    pub(super) transcript: HttpTranscript,
}

impl State for Closed {}
impl State for Notarize {}

mod sealed {
    pub trait Sealed {}

    impl Sealed for super::Closed {}
    impl Sealed for super::Notarize {}
}