MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / decode_trunk_state

Function decode_trunk_state

atomic-core/src/crdt/tables.rs:384–391  ·  view source on GitHub ↗
(byte: u8)

Source from the content-addressed store, hash-verified

382/// Returns `TrunkState::Alive` for unknown values (defensive).
383#[inline]
384pub 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.
394pub mod branch_state {

Callers 1

decode_trunk_valueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected