(byte: u8)
| 382 | /// Returns `TrunkState::Alive` for unknown values (defensive). |
| 383 | #[inline] |
| 384 | pub fn decode_trunk_state(byte: u8) -> TrunkState { |
| 385 | match byte { |
| 386 | trunk_state::ALIVE => TrunkState::Alive, |
| 387 | trunk_state::DELETED => TrunkState::Deleted, |
| 388 | trunk_state::ZOMBIE => TrunkState::Zombie, |
| 389 | _ => TrunkState::Alive, // Defensive default |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | /// State byte constants for BranchState. |
| 394 | pub mod branch_state { |
no outgoing calls
no test coverage detected