some missing From impls
This commit is contained in:
parent
9421465ffe
commit
cf556a407f
@ -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 {
|
||||
|
@ -63,6 +63,8 @@ impl PusServiceProvider for PusReceiver {
|
||||
drop(reporter);
|
||||
if service == 17 {
|
||||
self.handle_test_service(pus_tc, accepted_token);
|
||||
} else if service == 5 {
|
||||
// TODO: Send message to event manager here
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user