pub struct DurableActivityContext {
pub input: Value,
pub instance_id: String,
}
Expand description
Represents the Durable Functions activity context binding.
The following binding attributes are supported:
Name | Description |
---|---|
name | The name of the parameter being bound. |
activity | The 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§
Source§impl Clone for DurableActivityContext
impl Clone for DurableActivityContext
Source§fn clone(&self) -> DurableActivityContext
fn clone(&self) -> DurableActivityContext
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DurableActivityContext
impl Debug for DurableActivityContext
Source§impl<'de> Deserialize<'de> for DurableActivityContext
impl<'de> Deserialize<'de> for DurableActivityContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DurableActivityContext
impl RefUnwindSafe for DurableActivityContext
impl Send for DurableActivityContext
impl Sync for DurableActivityContext
impl Unpin for DurableActivityContext
impl UnwindSafe for DurableActivityContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request