/// Pushes an item into the queue if not full, returns
/// `Err(StateError::QueueFull)` along with the provided item otherwise.
Pushes an item into the queue if not full, returns
`Err(StateError::QueueFull)` along with the provided item otherwise.
Pushes an item into the queue if not full returns ` Err ( StateError :: QueueFull ) ` along with the provided item otherwise .
fn push(&mut self, msg: T) -> Result<(), (StateError, T)> {
        if let Err(e) = self.check_has_slot() {
            return Err((e, msg));
        }
        self.queue.push_back(Arc::new(msg));
        Ok(())
    }
fn push ( & mut self , msg : T ) -> Result < ( ) , ( StateError , T ) > { if let Err ( e ) = self . check_has_slot ( ) { return Err ( ( e , msg ) ) ; } self . queue . push_back ( Arc :: new ( msg ) ) ; Ok ( ( ) ) }
Pushes an item into the queue if not full, returns
`Err(StateError::QueueFull)` along with the provided item otherwise.
Pushes an item into the queue if not full returns ` Err ( StateError :: QueueFull ) ` along with the provided item otherwise .
&mut self
msg
T