pub enum BudgetSplitError {
ChildShareExceedsCap {
child_id: String,
share_bps: u16,
},
OversubscribedSiblings {
child_id: String,
share_bps: u16,
current_total_child_bps: u32,
parent_share_bps: u16,
},
UnknownParent {
parent_token_id: String,
},
DuplicateChild {
child_id: String,
},
ReleaseShareMismatch {
child_id: String,
expected_share_bps: u16,
actual_share_bps: u16,
},
}Expand description
Errors raised by BudgetSplit admission and release operations.
Variants§
The proposed child share alone exceeds the per-token cap of
MAX_BUDGET_SHARE_BPS. Per-token validation usually catches this
first; the registry repeats the check so a bypass cannot widen the
surface.
OversubscribedSiblings
Admitting this child would push the sum of sibling shares past the parent’s own share. The first sibling that hits this branch is rejected; previously admitted siblings are not retroactively evicted.
Fields
The proposed child share in basis points.
The parent’s own share, in basis points.
UnknownParent
The parent token is unknown to the registry. This happens when the verifier sees a delegation chain whose root was never registered, or after a parent has been evicted.
DuplicateChild
The child token has already been admitted under this parent. The registry is idempotent: re-admitting the same child with the same share takes an additional holder lease on the existing edge and succeeds, but a different share is a hard failure because it would let an attacker rewrite the split after the fact.
The release path was asked to remove a child with a different share than the one originally admitted. This is a hard failure because it means the caller is no longer unwinding the same delegation edge.
Trait Implementations§
Source§impl Clone for BudgetSplitError
impl Clone for BudgetSplitError
Source§fn clone(&self) -> BudgetSplitError
fn clone(&self) -> BudgetSplitError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more