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

Function encode_trunk_state

atomic-core/src/crdt/tables.rs:372–378  ·  view source on GitHub ↗
(state: TrunkState)

Source from the content-addressed store, hash-verified

370/// Encode a TrunkState as a single byte.
371#[inline]
372pub fn encode_trunk_state(state: TrunkState) -> u8 {
373 match state {
374 TrunkState::Alive => trunk_state::ALIVE,
375 TrunkState::Deleted => trunk_state::DELETED,
376 TrunkState::Zombie => trunk_state::ZOMBIE,
377 }
378}
379
380/// Decode a TrunkState from a byte.
381///

Callers 1

encode_trunk_valueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected