pub struct NoopBudgetRegistry;Expand description
A no-op BudgetRegistry used by callers that have not yet wired the
budget plumbing.
register_parent and try_admit_child always return Ok(()) and the
registry never tracks state. This is suitable for compatibility entry points
that only check signature, issuer trust, and time bounds; new code
should use a real registry so sibling oversubscription is rejected.
Trait Implementations§
Source§impl BudgetRegistry for NoopBudgetRegistry
impl BudgetRegistry for NoopBudgetRegistry
Source§fn register_parent(
&mut self,
_parent_token_id: String,
_parent_share_bps: u16,
) -> Result<(), BudgetSplitError>
fn register_parent( &mut self, _parent_token_id: String, _parent_share_bps: u16, ) -> Result<(), BudgetSplitError>
Register a parent token’s share so subsequent delegations can be
admitted against it. Re-registering the same parent with the same
share is idempotent. Re-registering with a different share is a hard
failure: the caller probably fed two distinct tokens with the same
id, which is a delegation-graph bug.
Source§fn try_admit_child(
&mut self,
_parent_token_id: &str,
_child_token_id: String,
_share_bps: u16,
) -> Result<(), BudgetSplitError>
fn try_admit_child( &mut self, _parent_token_id: &str, _child_token_id: String, _share_bps: u16, ) -> Result<(), BudgetSplitError>
Try to admit a child token under the given parent. Read more
Source§fn verify_child_admission(
&mut self,
_parent_token_id: &str,
_child_token_id: String,
_share_bps: u16,
) -> Result<(), BudgetSplitError>
fn verify_child_admission( &mut self, _parent_token_id: &str, _child_token_id: String, _share_bps: u16, ) -> Result<(), BudgetSplitError>
Check whether a child token would admit under the given parent WITHOUT
acquiring a holder lease. Read more
Source§fn release_child(
&mut self,
_parent_token_id: &str,
_child_token_id: &str,
_expected_share_bps: u16,
) -> Result<(), BudgetSplitError>
fn release_child( &mut self, _parent_token_id: &str, _child_token_id: &str, _expected_share_bps: u16, ) -> Result<(), BudgetSplitError>
Release a previously admitted child token under the given parent. Read more
Source§fn evict_parent(&mut self, _parent_token_id: &str)
fn evict_parent(&mut self, _parent_token_id: &str)
Drop the parent’s split from the registry. Idempotent; calling
evict_parent on an unregistered parent is a no-op so revocation
races do not abort verification.Source§impl Clone for NoopBudgetRegistry
impl Clone for NoopBudgetRegistry
Source§fn clone(&self) -> NoopBudgetRegistry
fn clone(&self) -> NoopBudgetRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NoopBudgetRegistry
Source§impl Debug for NoopBudgetRegistry
impl Debug for NoopBudgetRegistry
Source§impl Default for NoopBudgetRegistry
impl Default for NoopBudgetRegistry
Source§fn default() -> NoopBudgetRegistry
fn default() -> NoopBudgetRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NoopBudgetRegistry
impl RefUnwindSafe for NoopBudgetRegistry
impl Send for NoopBudgetRegistry
impl Sync for NoopBudgetRegistry
impl Unpin for NoopBudgetRegistry
impl UnsafeUnpin for NoopBudgetRegistry
impl UnwindSafe for NoopBudgetRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more