Struct google_api_proto::google::actions::sdk::v2::interactionmodel::Scene
source · pub struct Scene {
pub on_enter: Option<EventHandler>,
pub intent_events: Vec<IntentEvent>,
pub conditional_events: Vec<ConditionalEvent>,
pub slots: Vec<Slot>,
pub on_slot_updated: Option<EventHandler>,
}
Expand description
Scene is the basic unit of control flow when designing a conversation. They can be chained together with other scenes, generate prompts for the end user, and define slots. The scene name is specified in the name of the file.
Fields§
§on_enter: Option<EventHandler>
Handler to invoke when transitioning into this scene.
intent_events: Vec<IntentEvent>
The list of events that trigger based on intents. These events can be triggered at any time after the on_load Handler has been called. Important - these events define the set of intents which are scoped to this scene and will take precedence over any globally defined events that have the same intents or their triggering phrases. Intent names must be unique within a scene.
conditional_events: Vec<ConditionalEvent>
The list of events to trigger based on conditional statements. These are evaluated after the form has been filled or immediately after on_load if this scene does not have a form (evaluation is only done once). Only the first matching event will be triggered.
slots: Vec<Slot>
Ordered list of slots. Each slot defines the type of data that it will resolve and configuration to customize the experience of this resolution (e.g. prompts).
on_slot_updated: Option<EventHandler>
Handler called when there is a change in state of a slot not caused by updates within another Handler. This allows slots to be invalidated, the scene invalidated or other changes to scene state.
Trait Implementations§
source§impl Message for Scene
impl Message for Scene
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Scene
impl PartialEq for Scene
impl StructuralPartialEq for Scene
Auto Trait Implementations§
impl Freeze for Scene
impl RefUnwindSafe for Scene
impl Send for Scene
impl Sync for Scene
impl Unpin for Scene
impl UnwindSafe for Scene
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
T
in a tonic::Request