pub fn try_acquire(
            &self,
            nr_permits: usize,
        ) -> Option<GenericSharedSemaphoreReleaser<MutexType>> {
            if self.state.lock().try_acquire_sync(nr_permits) {
                Some(GenericSharedSemaphoreReleaser {
                    semaphore: self.clone(),
                    permits: nr_permits,
                })
            } else {
                None
            }
        }
/// Tries to acquire a certain amount of permits on a semaphore.
///
/// If acquiring the permits is successful, a [`GenericSharedSemaphoreReleaser`]
/// will be returned, which will release all acquired permits automatically
/// when dropped.
///
/// Otherwise `None` will be returned.
Tries to acquire a certain amount of permits on a semaphore.
If acquiring the permits is successful, a [`GenericSharedSemaphoreReleaser`]
will be returned, which will release all acquired permits automatically
when dropped.

Otherwise `None` will be returned.
Tries to acquire a certain amount of permits on a semaphore . If acquiring the permits is successful a [ ` GenericSharedSemaphoreReleaser ` ] will be returned which will release all acquired permits automatically when dropped . Otherwise ` None ` will be returned .
pub fn try_acquire(
            &self,
            nr_permits: usize,
        ) -> Option<GenericSharedSemaphoreReleaser<MutexType>> {
            if self.state.lock().try_acquire_sync(nr_permits) {
                Some(GenericSharedSemaphoreReleaser {
                    semaphore: self.clone(),
                    permits: nr_permits,
                })
            } else {
                None
            }
        }
pub fn try_acquire ( & self , nr_permits : usize , ) -> Option < GenericSharedSemaphoreReleaser < MutexType > > { if self . state . lock ( ) . try_acquire_sync ( nr_permits ) { Some ( GenericSharedSemaphoreReleaser { semaphore : self . clone ( ) , permits : nr_permits , } ) } else { None } }
Tries to acquire a certain amount of permits on a semaphore.
Tries to acquire a certain amount of permits on a semaphore .
&self
nr_permits
usize
&self
nr_permits
usize