pub fn try_push(&self, item: T) -> Result<(), T> {
        match self.push_semaphore.try_acquire() {
            Ok(permit) => {
                self.base.push(item);
                permit.forget();
                Ok(())
            }
            Err(_) => Err(item),
        }
    }
/// Try to push an item to the queue. If the queue is currently
/// full return the object as `Err<T>`.
Try to push an item to the queue. If the queue is currently
full return the object as `Err`.
Try to push an item to the queue . If the queue is currently full return the object as ` Err ` .
pub fn try_push(&self, item: T) -> Result<(), T> {
        match self.push_semaphore.try_acquire() {
            Ok(permit) => {
                self.base.push(item);
                permit.forget();
                Ok(())
            }
            Err(_) => Err(item),
        }
    }
pub fn try_push ( & self , item : T ) -> Result < ( ) , T > { match self . push_semaphore . try_acquire ( ) { Ok ( permit ) => { self . base . push ( item ) ; permit . forget ( ) ; Ok ( ( ) ) } Err ( _ ) => Err ( item ) , } }
Try to push an item to the queue.
Try to push an item to the queue .
&self
item
T
&self
item
T