pub fn publish<T: Serialize>(&self, body: T) -> Result<()> {
        let message = MemoryMessage::new(body)?;

        let mut queue_guard = self.lock()?;
        let queue = &mut queue_guard;

        queue.push_back(message);

        Ok(())
    }
/// Publishes a message to the memory queue.
Publishes a message to the memory queue.
Publishes a message to the memory queue .
pub fn publish<T: Serialize>(&self, body: T) -> Result<()> {
        let message = MemoryMessage::new(body)?;
        let mut queue_guard = self.lock()?;
        let queue = &mut queue_guard;
        queue.push_back(message);
        Ok(())
    }
pub fn publish < T : Serialize > ( & self , body : T ) -> Result < ( ) > { let message = MemoryMessage :: new ( body ) ? ; let mut queue_guard = self . lock ( ) ? ; let queue = & mut queue_guard ; queue . push_back ( message ) ; Ok ( ( ) ) }
Publishes a message to the memory queue.
Publishes a message to the memory queue .
&self
body
T