pub struct VocabBuildPermit<'a> { /* private fields */ }Expand description
Releases a caller’s count permit + byte charge and wakes waiters on drop (incl. error or panic).
Fields stay private: the only way to obtain one is acquire/acquire_vocab_build_bytes.
Implementations§
Source§impl PermitGuard<'_>
impl PermitGuard<'_>
Sourcepub fn ensure_covers(&self, required: usize) -> Result<(), CompileError>
pub fn ensure_covers(&self, required: usize) -> Result<(), CompileError>
Err unless this permit’s charged bytes cover required - the check every *_admitted
constructor runs before trusting a caller-supplied permit as real admission proof.
Trait Implementations§
Source§impl<'a> Debug for PermitGuard<'a>
impl<'a> Debug for PermitGuard<'a>
Source§impl Drop for PermitGuard<'_>
impl Drop for PermitGuard<'_>
Auto Trait Implementations§
impl<'a> Freeze for PermitGuard<'a>
impl<'a> RefUnwindSafe for PermitGuard<'a>
impl<'a> Send for PermitGuard<'a>
impl<'a> Sync for PermitGuard<'a>
impl<'a> Unpin for PermitGuard<'a>
impl<'a> UnsafeUnpin for PermitGuard<'a>
impl<'a> UnwindSafe for PermitGuard<'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