pub struct EventGridEvent {
pub topic: String,
pub subject: String,
pub event_type: String,
pub event_time: DateTime<Utc>,
pub id: String,
pub data: Value,
pub data_version: String,
pub metadata_version: String,
}
Expand description
Represents an Event Grid trigger binding.
The following binding attributes are supported:
Name | Description |
---|---|
name | The name of the parameter being bound. |
§Examples
use azure_functions::{
bindings::EventGridEvent,
func,
};
use log::info;
#[func]
pub fn log_event(event: EventGridEvent) {
log::info!("Event Data: {}", event.data);
}
Fields§
§topic: String
Full resource path to the event source.
subject: String
Publisher-defined path to the event subject.
event_type: String
One of the registered event types for this event source.
event_time: DateTime<Utc>
The time the event is generated based on the provider’s UTC time.
id: String
Unique identifier for the event.
data: Value
Event data specific to the resource provider.
data_version: String
The schema version of the data object.
metadata_version: String
The schema version of the event metadata.
Trait Implementations§
Source§impl Debug for EventGridEvent
impl Debug for EventGridEvent
Source§impl<'de> Deserialize<'de> for EventGridEvent
impl<'de> Deserialize<'de> for EventGridEvent
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 EventGridEvent
impl RefUnwindSafe for EventGridEvent
impl Send for EventGridEvent
impl Sync for EventGridEvent
impl Unpin for EventGridEvent
impl UnwindSafe for EventGridEvent
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