pub struct FreshParticipantCapacityCounter { /* private fields */ }Expand description
Provably empty, nonzero per-participant capacity for fresh enrollment.
This type removes the unreachable enrollment refusal arms while still forcing the successful transaction to reserve both new participant rows.
Implementations§
Source§impl FreshParticipantCapacityCounter
impl FreshParticipantCapacityCounter
Sourcepub const fn try_new(
limit: u64,
occupied: u64,
) -> Result<Self, FreshParticipantCapacityCounterInvariantError>
pub const fn try_new( limit: u64, occupied: u64, ) -> Result<Self, FreshParticipantCapacityCounterInvariantError>
Restores a fresh-participant counter only at occupancy zero.
§Errors
Returns FreshParticipantCapacityCounterInvariantError::Capacity for
an invalid base counter or
FreshParticipantCapacityCounterInvariantError::Nonempty when a
not-yet-minted participant already has a row.
Trait Implementations§
Source§impl Clone for FreshParticipantCapacityCounter
impl Clone for FreshParticipantCapacityCounter
Source§fn clone(&self) -> FreshParticipantCapacityCounter
fn clone(&self) -> FreshParticipantCapacityCounter
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 FreshParticipantCapacityCounter
impl Eq for FreshParticipantCapacityCounter
impl StructuralPartialEq for FreshParticipantCapacityCounter
Auto Trait Implementations§
impl Freeze for FreshParticipantCapacityCounter
impl RefUnwindSafe for FreshParticipantCapacityCounter
impl Send for FreshParticipantCapacityCounter
impl Sync for FreshParticipantCapacityCounter
impl Unpin for FreshParticipantCapacityCounter
impl UnsafeUnpin for FreshParticipantCapacityCounter
impl UnwindSafe for FreshParticipantCapacityCounter
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