try enum
This commit is contained in:
parent
d34e62101c
commit
e4a6810442
@ -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> {
|
||||||
|
Loading…
Reference in New Issue
Block a user