[][src]Struct azure_functions::bindings::QueueTrigger

pub struct QueueTrigger {
    pub message: QueueMessage,
    pub id: String,
    pub dequeue_count: u32,
    pub expiration_time: DateTime<Utc>,
    pub insertion_time: DateTime<Utc>,
    pub next_visible_time: DateTime<Utc>,
    pub pop_receipt: String,
}

Represents a queue trigger binding.

The following binding attributes are supported:

Name Description
name The name of the parameter being bound.
queue_name The name of the queue to poll.
connection The name of an app setting that contains the Azure Storage connection string to use for this binding. Defaults to the AzureWebJobsStorage.

Examples

A function that runs when a message is posted to a queue called example:

use azure_functions::bindings::QueueTrigger;
use azure_functions::func;
use log::info;

#[func]
#[binding(name = "trigger", queue_name = "example")]
pub fn run_on_message(trigger: QueueTrigger) {
    info!("Rust function ran due to queue message: {}", trigger.message);
}

Fields

message: QueueMessage

The queue message that triggered the function.

id: String

The queue message identifier.

dequeue_count: u32

The number of times this message has been dequeued.

expiration_time: DateTime<Utc>

The time that the message expires.

insertion_time: DateTime<Utc>

The time that the message was added to the queue.

next_visible_time: DateTime<Utc>

The time that the message will next be visible.

pop_receipt: String

The message's pop receipt.

Trait Implementations

impl Debug for QueueTrigger[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T