#[non_exhaustive]pub struct EventHandler {
pub event: String,
pub condition: String,
pub fulfillment: Option<Fulfillment>,
/* private fields */
}Available on crate feature
playbooks only.Expand description
A handler that is triggered by the specified event.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.event: StringRequired. The name of the event that triggers this handler.
condition: StringOptional. The condition that must be satisfied to trigger this handler.
fulfillment: Option<Fulfillment>Required. The fulfillment to call when the event occurs.
Implementations§
Source§impl EventHandler
impl EventHandler
Sourcepub fn set_condition<T: Into<String>>(self, v: T) -> Self
pub fn set_condition<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_fulfillment<T>(self, v: T) -> Selfwhere
T: Into<Fulfillment>,
pub fn set_fulfillment<T>(self, v: T) -> Selfwhere
T: Into<Fulfillment>,
Sets the value of fulfillment.
§Example
ⓘ
use google_cloud_dialogflow_cx_v3::model::Fulfillment;
let x = EventHandler::new().set_fulfillment(Fulfillment::default()/* use setters */);Sourcepub fn set_or_clear_fulfillment<T>(self, v: Option<T>) -> Selfwhere
T: Into<Fulfillment>,
pub fn set_or_clear_fulfillment<T>(self, v: Option<T>) -> Selfwhere
T: Into<Fulfillment>,
Sets or clears the value of fulfillment.
§Example
ⓘ
use google_cloud_dialogflow_cx_v3::model::Fulfillment;
let x = EventHandler::new().set_or_clear_fulfillment(Some(Fulfillment::default()/* use setters */));
let x = EventHandler::new().set_or_clear_fulfillment(None::<Fulfillment>);Trait Implementations§
Source§impl Clone for EventHandler
impl Clone for EventHandler
Source§fn clone(&self) -> EventHandler
fn clone(&self) -> EventHandler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EventHandler
impl Debug for EventHandler
Source§impl Default for EventHandler
impl Default for EventHandler
Source§fn default() -> EventHandler
fn default() -> EventHandler
Returns the “default value” for a type. Read more
Source§impl Message for EventHandler
impl Message for EventHandler
Source§impl PartialEq for EventHandler
impl PartialEq for EventHandler
Source§fn eq(&self, other: &EventHandler) -> bool
fn eq(&self, other: &EventHandler) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EventHandler
Auto Trait Implementations§
impl Freeze for EventHandler
impl RefUnwindSafe for EventHandler
impl Send for EventHandler
impl Sync for EventHandler
impl Unpin for EventHandler
impl UnsafeUnpin for EventHandler
impl UnwindSafe for EventHandler
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