pub struct BatchLimitGuard<'a> { /* private fields */ }Expand description
Atomic multi-leg daily admission. Every per-leg policy and the aggregate currency deltas are checked before this guard is returned; commit is all-or-nothing and idempotent by receipt ID.
Implementations§
Source§impl BatchLimitGuard<'_>
impl BatchLimitGuard<'_>
Sourcepub fn commit_daily_once(self) -> Result<(), LimitOutcome>
pub fn commit_daily_once(self) -> Result<(), LimitOutcome>
Commit all currency buckets exactly once for this caller+intent.
pub fn is_already_committed(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BatchLimitGuard<'a>
impl<'a> !UnwindSafe for BatchLimitGuard<'a>
impl<'a> Freeze for BatchLimitGuard<'a>
impl<'a> Send for BatchLimitGuard<'a>
impl<'a> Sync for BatchLimitGuard<'a>
impl<'a> Unpin for BatchLimitGuard<'a>
impl<'a> UnsafeUnpin for BatchLimitGuard<'a>
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