pub struct BlobTrigger {
pub blob: Blob,
pub path: String,
pub uri: String,
pub properties: Properties,
pub metadata: HashMap<String, String>,
}Expand description
Represents an Azure Storage blob trigger binding.
The following binding attributes are supported:
| Name | Description |
|---|---|
name | The name of the parameter being bound. |
path | The container to monitor. May be a blob name pattern. |
connection | The name of an app setting that contains the Storage connection string to use for this binding. Defaults to AzureWebJobsStorage. |
§Examples
A function that runs when a blob is created in the example container:
use azure_functions::bindings::BlobTrigger;
use azure_functions::func;
use log::info;
#[func]
#[binding(name = "trigger", path = "example/")]
pub fn print_blob(trigger: BlobTrigger) {
info!("Blob (as string): {}", trigger.blob.as_str().unwrap());
}Fields§
§blob: BlobThe blob that triggered the function.
path: StringThe path of the blob.
uri: StringThe URI of the blob.
properties: PropertiesThe properties of the blob.
metadata: HashMap<String, String>The metadata of the blob.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlobTrigger
impl RefUnwindSafe for BlobTrigger
impl Send for BlobTrigger
impl Sync for BlobTrigger
impl Unpin for BlobTrigger
impl UnwindSafe for BlobTrigger
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> 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