[][src]Struct azure_functions::bindings::DurableActivityContext

pub struct DurableActivityContext {
    pub input: Value,
    pub instance_id: String,
}

Represents the Durable Functions activity context binding.

The following binding attributes are supported:

NameDescription
nameThe name of the parameter being bound.
activityThe name of the activity. Defaults to the name of the function.

Examples

An activity that outputs a string:

use azure_functions::{bindings::DurableActivityContext, durable::ActivityOutput, func};

#[func]
pub fn say_hello(context: DurableActivityContext) -> ActivityOutput {
    format!(
        "Hello {}!",
        context.input.as_str().expect("expected a string input")
    )
    .into()
}

Fields

input: Value

The input to the activity function.

instance_id: String

The orchestration instance identifier.

Trait Implementations

impl Clone for DurableActivityContext[src]

impl Debug for DurableActivityContext[src]

impl<'de> Deserialize<'de> for DurableActivityContext[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,