some missing From impls
This commit is contained in:
@ -197,12 +197,31 @@ pub struct StateAccepted;
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
pub struct StateStarted;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq)]
|
||||
pub enum StateToken {
|
||||
None(StateNone),
|
||||
Accepted(StateAccepted),
|
||||
Started(StateStarted),
|
||||
}
|
||||
|
||||
impl From<StateNone> for StateToken {
|
||||
fn from(t: StateNone) -> Self {
|
||||
StateToken::None(t)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<StateAccepted> for StateToken {
|
||||
fn from(t: StateAccepted) -> Self {
|
||||
StateToken::Accepted(t)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<StateStarted> for StateToken {
|
||||
fn from(t: StateStarted) -> Self {
|
||||
StateToken::Started(t)
|
||||
}
|
||||
}
|
||||
|
||||
impl<STATE> VerificationToken<STATE> {
|
||||
fn new(req_id: RequestId) -> VerificationToken<StateNone> {
|
||||
VerificationToken {
|
||||
|
Reference in New Issue
Block a user