Encode for the versioned byte encoding.
(self)
| 56 | |
| 57 | /// Encode for the versioned byte encoding. |
| 58 | pub fn to_u8(self) -> u8 { |
| 59 | match self { |
| 60 | Self::Synchronized => 0, |
| 61 | Self::GitAhead => 1, |
| 62 | Self::AtomicAhead => 2, |
| 63 | Self::Diverged => 3, |
| 64 | Self::Unrepresentable => 4, |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | impl std::fmt::Display for RefSyncStatus { |