pub struct MkAsyncSemaphore { /* private fields */ }Expand description
Async semaphore for controlling concurrent access.
Implementations§
Source§impl MkAsyncSemaphore
impl MkAsyncSemaphore
Sourcepub async fn acquire(&self) -> SemaphorePermit<'_>
pub async fn acquire(&self) -> SemaphorePermit<'_>
Acquire a permit.
Sourcepub fn try_acquire(&self) -> Option<SemaphorePermit<'_>>
pub fn try_acquire(&self) -> Option<SemaphorePermit<'_>>
Try to acquire a permit without waiting.
Auto Trait Implementations§
impl !Freeze for MkAsyncSemaphore
impl RefUnwindSafe for MkAsyncSemaphore
impl Send for MkAsyncSemaphore
impl Sync for MkAsyncSemaphore
impl Unpin for MkAsyncSemaphore
impl UnwindSafe for MkAsyncSemaphore
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