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

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

Represents a queue trigger binding.

Examples

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

use azure_functions::bindings::QueueTrigger;
use azure_functions::func;

#[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: Option<DateTime<Utc>>

The time that the message expires.

insertion_time: Option<DateTime<Utc>>

The time that the message was added to the queue.

next_visible_time: Option<DateTime<Utc>>

The time that the message will next be visible.

pop_receipt: String

The message's pop receipt.

Trait Implementations

impl From<TypedData> for QueueTrigger[src]

impl Debug for QueueTrigger[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

impl<T> Erased for T