embedded-nano-mesh 2.1.11

Lightweight mesh communication protocol for embedded devices
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::super::PacketState;
use super::super::StateMutator;

impl StateMutator for PacketState {
    fn mutated(self) -> Self {
        match self {
            Self::Ping => Self::Pong,
            Self::SendTransaction => Self::AcceptTransaction,
            Self::AcceptTransaction => Self::InitTransaction,
            Self::InitTransaction => Self::FinishTransaction,
            _ => self,
        }
    }
}