async fn peek_lock_message(
    http_client: &Arc<dyn HttpClient>,
    namespace: &str,
    queue: &str,
    policy_name: &str,
    signing_key: &hmac::Key,
    lock_expiry: Option<Duration>,
) -> Result<Response<Bytes>, Error> {
    let url = craft_peek_lock_url(namespace, queue, lock_expiry)?;

    let req = prepare_request(
        &url.to_string(),
        Method::POST,
        None,
        policy_name,
        signing_key,
    )?;

    http_client
        .execute_request_check_status(req, http::StatusCode::CREATED)
        .await
}
/// Non-destructively read a message
///
/// Note: This function does not return the delete location
/// of the message, so, after reading, you will lose
/// "track" of it until the lock expiry runs out and
/// the message can be consumed by others. If you want to keep
/// track of this message (i.e., have the possibility of deletion),
/// use `peek_lock_message2`.
Non-destructively read a message
Note: This function does not return the delete location
of the message, so, after reading, you will lose
"track" of it until the lock expiry runs out and
the message can be consumed by others. If you want to keep
track of this message ,
use `peek_lock_message2`.
Non - destructively read a message Note : This function does not return the delete location of the message so after reading you will lose " track " of it until the lock expiry runs out and the message can be consumed by others . If you want to keep track of this message use ` peek_lock_message2 ` .
async fn peek_lock_message(
    http_client: &Arc<dyn HttpClient>,
    namespace: &str,
    queue: &str,
    policy_name: &str,
    signing_key: &hmac::Key,
    lock_expiry: Option<Duration>,
) -> Result<Response<Bytes>, Error> {
    let url = craft_peek_lock_url(namespace, queue, lock_expiry)?;
    let req = prepare_request(
        &url.to_string(),
        Method::POST,
        None,
        policy_name,
        signing_key,
    )?;
    http_client
        .execute_request_check_status(req, http::StatusCode::CREATED)
        .await
}
async fn peek_lock_message ( http_client : & Arc < dyn HttpClient > , namespace : & str , queue : & str , policy_name : & str , signing_key : & hmac :: Key , lock_expiry : Option < Duration > , ) -> Result < Response < Bytes > , Error > { let url = craft_peek_lock_url ( namespace , queue , lock_expiry ) ? ; let req = prepare_request ( & url . to_string ( ) , Method :: POST , None , policy_name , signing_key , ) ? ; http_client . execute_request_check_status ( req , http :: StatusCode :: CREATED ) . await }
Non-destructively read a message
Note: This function does not return the delete location
of the message, so, after reading, you will lose
"track" of it until the lock expiry runs out and
the message can be consumed by others.
Non - destructively read a message Note : This function does not return the delete location of the message so after reading you will lose " track " of it until the lock expiry runs out and the message can be consumed by others .
http_client
&Arc<dyn HttpClient>
namespace
&str
queue
&str
policy_name
&str
signing_key
&hmac::Key
lock_expiry
Option<Duration>