pub async fn pop(manager: Arc<Manager<'_>>, name: String) -> Result<Json> {
    let queue = manager.queue(&name)?;

    queue.log_event(&name, &manager, Event::Pop).await?;

    let mut database = queue.database().await;
    let message = database.pop().ok_or(QueueError::NoMessageAvailable)?;

    Ok(json(&PopResponse::from(message)))
}
/// Pop message from queue.
///
/// Doesn't require any input, returns reserved message.
///
/// After reserving message, you either need to return it to queue, or delete it.
///
/// Messages that are not returned after timeout are deleted by GC.
Pop message from queue.
Doesn't require any input, returns reserved message.

After reserving message, you either need to return it to queue, or delete it.

Messages that are not returned after timeout are deleted by GC.
Pop message from queue . Doesn ' t require any input returns reserved message . After reserving message you either need to return it to queue or delete it . Messages that are not returned after timeout are deleted by GC .
pub async fn pop(manager: Arc<Manager<'_>>, name: String) -> Result<Json> {
    let queue = manager.queue(&name)?;
    queue.log_event(&name, &manager, Event::Pop).await?;
    let mut database = queue.database().await;
    let message = database.pop().ok_or(QueueError::NoMessageAvailable)?;
    Ok(json(&PopResponse::from(message)))
}
pub async fn pop ( manager : Arc < Manager < ' _ > > , name : String ) -> Result < Json > { let queue = manager . queue ( & name ) ? ; queue . log_event ( & name , & manager , Event :: Pop ) . await ? ; let mut database = queue . database ( ) . await ; let message = database . pop ( ) . ok_or ( QueueError :: NoMessageAvailable ) ? ; Ok ( json ( & PopResponse :: from ( message ) ) ) }
Pop message from queue.
Pop message from queue .
manager
Arc<Manager<'_>>
name
String
manager
Arc<Manager<'_>>
name
String