Skip to main content

NoopBudgetRegistry

Struct NoopBudgetRegistry 

Source
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

Source§

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>

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>

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>

Release a previously admitted child token under the given parent. Read more
Source§

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

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Copy for NoopBudgetRegistry

Source§

impl Debug for NoopBudgetRegistry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NoopBudgetRegistry

Source§

fn default() -> NoopBudgetRegistry

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.