This commit is contained in:
Robin Müller 2022-10-15 19:36:13 +02:00
parent d34e62101c
commit e4a6810442
No known key found for this signature in database
GPG Key ID: FC76078F520434A5

View File

@ -191,11 +191,17 @@ pub struct VerificationToken<STATE> {
} }
#[derive(Copy, Clone, Debug, Eq, PartialEq)] #[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct StateNone; pub enum StateNone {}
#[derive(Copy, Clone, Debug, Eq, PartialEq)] #[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct StateAccepted; pub enum StateAccepted {}
#[derive(Copy, Clone, Debug, Eq, PartialEq)] #[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct StateStarted; pub enum StateStarted {}
pub enum StateToken {
None(StateNone),
Accepted(StateAccepted),
Started(StateStarted)
}
impl<STATE> VerificationToken<STATE> { impl<STATE> VerificationToken<STATE> {
fn new(req_id: RequestId) -> VerificationToken<StateNone> { fn new(req_id: RequestId) -> VerificationToken<StateNone> {