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

Method fmt

atomic-core/src/crdt/apply/error.rs:641–744  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

639
640impl fmt::Display for ApplyError {
641 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
642 match self {
643 ApplyError::TrunkNotFound { trunk_id } => {
644 write!(f, "trunk not found: {}", trunk_id)
645 }
646 ApplyError::BranchNotFound { branch_id } => {
647 write!(f, "branch not found: {}", branch_id)
648 }
649 ApplyError::LeafNotFound { leaf_id } => {
650 write!(f, "leaf not found: {}", leaf_id)
651 }
652 ApplyError::PathNotFound { path } => {
653 write!(f, "path not found: {:?}", path)
654 }
655 ApplyError::TrunkAlreadyExists { trunk_id } => {
656 write!(f, "trunk already exists: {}", trunk_id)
657 }
658 ApplyError::BranchAlreadyExists { branch_id } => {
659 write!(f, "branch already exists: {}", branch_id)
660 }
661 ApplyError::LeafAlreadyExists { leaf_id } => {
662 write!(f, "leaf already exists: {}", leaf_id)
663 }
664 ApplyError::PathAlreadyExists {
665 path,
666 existing_trunk,
667 } => {
668 write!(
669 f,
670 "path already exists: {:?} (trunk: {})",
671 path, existing_trunk
672 )
673 }
674 ApplyError::InvalidTrunkState {
675 trunk_id,
676 current_state,
677 operation,
678 } => {
679 write!(
680 f,
681 "invalid trunk state for {}: cannot {} (current state: {})",
682 trunk_id, operation, current_state
683 )
684 }
685 ApplyError::InvalidBranchState {
686 branch_id,
687 current_state,
688 operation,
689 } => {
690 write!(
691 f,
692 "invalid branch state for {}: cannot {} (current state: {})",
693 branch_id, operation, current_state
694 )
695 }
696 ApplyError::InvalidLeafState {
697 leaf_id,
698 current_state,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected