pub struct CustodyQuota<'root, const N: usize> { /* private fields */ }Expand description
N bounds additional publication attempts tracked in this ledger. The host must hold its aggregate-quota lease for the ledger’s complete lifetime.
Implementations§
Source§impl<'root, const N: usize> CustodyQuota<'root, N>
impl<'root, const N: usize> CustodyQuota<'root, N>
Sourcepub fn recovery_root_scope(
&mut self,
) -> Result<RecoveryRootScope<'root>, QuotaError>
pub fn recovery_root_scope( &mut self, ) -> Result<RecoveryRootScope<'root>, QuotaError>
Borrow actual root provenance without retaining a mutable quota borrow. This does not refund/reissue old usage or authenticate a particular run.
Source§impl<'root, const N: usize> CustodyQuota<'root, N>
impl<'root, const N: usize> CustodyQuota<'root, N>
Sourcepub fn admit_staging(
&mut self,
attempt: [u8; 32],
allowance: u64,
) -> Result<StagingCharge<'root>, QuotaError>
pub fn admit_staging( &mut self, attempt: [u8; 32], allowance: u64, ) -> Result<StagingCharge<'root>, QuotaError>
Charges the full explicit allowance before any staging filesystem work. The returned token borrows the root, not this mutable ledger.
Source§impl<'root, const N: usize> CustodyQuota<'root, N>
impl<'root, const N: usize> CustodyQuota<'root, N>
pub fn from_authenticated_usage( root: &'root Path, limits: QuotaLimits, snapshot: QuotaSnapshot, authority: &impl QuotaSnapshotAuthority, ) -> Result<Self, QuotaError>
Sourcepub const fn charged_usage(&self) -> (u64, u64)
pub const fn charged_usage(&self) -> (u64, u64)
Current charged usage, including attempts that may not have published. This does not mint a fresh authenticated snapshot identifier.
Auto Trait Implementations§
impl<'root, const N: usize> Freeze for CustodyQuota<'root, N>
impl<'root, const N: usize> RefUnwindSafe for CustodyQuota<'root, N>
impl<'root, const N: usize> Send for CustodyQuota<'root, N>
impl<'root, const N: usize> Sync for CustodyQuota<'root, N>
impl<'root, const N: usize> Unpin for CustodyQuota<'root, N>
impl<'root, const N: usize> UnsafeUnpin for CustodyQuota<'root, N>
impl<'root, const N: usize> UnwindSafe for CustodyQuota<'root, N>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more