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

    queue
        .log_event(&name, &manager, Event::Delete(request.id))
        .await?;

    let message = queue
        .database()
        .await
        .delete(request.id)
        .ok_or(QueueError::MessageNotFound)?;

    Ok(json(&DeleteResponse::from(message)))
}
/// Delete message from queue.
///
/// Requires ID of message being deleted, returns deleted message.
Delete message from queue.
Requires ID of message being deleted, returns deleted message.
Delete message from queue . Requires ID of message being deleted returns deleted message .
pub async fn delete(
    manager: Arc<Manager<'_>>,
    name: String,
    request: DeleteRequest,
) -> Result<Json> {
    let queue = manager.queue(&name)?;
    queue
        .log_event(&name, &manager, Event::Delete(request.id))
        .await?;
    let message = queue
        .database()
        .await
        .delete(request.id)
        .ok_or(QueueError::MessageNotFound)?;
    Ok(json(&DeleteResponse::from(message)))
}
pub async fn delete ( manager : Arc < Manager < ' _ > > , name : String , request : DeleteRequest , ) -> Result < Json > { let queue = manager . queue ( & name ) ? ; queue . log_event ( & name , & manager , Event :: Delete ( request . id ) ) . await ? ; let message = queue . database ( ) . await . delete ( request . id ) . ok_or ( QueueError :: MessageNotFound ) ? ; Ok ( json ( & DeleteResponse :: from ( message ) ) ) }
Delete message from queue.
Delete message from queue .
manager
Arc<Manager<'_>>
name
String
request
DeleteRequest
manager
Arc<Manager<'_>>
name
String
request
DeleteRequest