#[non_exhaustive]pub struct SimpleResponse {
pub text_to_speech: String,
pub ssml: String,
pub display_text: String,
/* private fields */
}Available on crate features
answer-records or intents or participants or sessions only.Expand description
The simple response message containing speech or text.
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.text_to_speech: StringOne of text_to_speech or ssml must be provided. The plain text of the speech output. Mutually exclusive with ssml.
ssml: StringOne of text_to_speech or ssml must be provided. Structured spoken response to the user in the SSML format. Mutually exclusive with text_to_speech.
display_text: StringOptional. The text to display.
Implementations§
Source§impl SimpleResponse
impl SimpleResponse
pub fn new() -> Self
Sourcepub fn set_text_to_speech<T: Into<String>>(self, v: T) -> Self
pub fn set_text_to_speech<T: Into<String>>(self, v: T) -> Self
Sets the value of text_to_speech.
§Example
ⓘ
let x = SimpleResponse::new().set_text_to_speech("example");Sourcepub fn set_display_text<T: Into<String>>(self, v: T) -> Self
pub fn set_display_text<T: Into<String>>(self, v: T) -> Self
Sets the value of display_text.
§Example
ⓘ
let x = SimpleResponse::new().set_display_text("example");Trait Implementations§
Source§impl Clone for SimpleResponse
impl Clone for SimpleResponse
Source§fn clone(&self) -> SimpleResponse
fn clone(&self) -> SimpleResponse
Returns a duplicate 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 SimpleResponse
impl Debug for SimpleResponse
Source§impl Default for SimpleResponse
impl Default for SimpleResponse
Source§fn default() -> SimpleResponse
fn default() -> SimpleResponse
Returns the “default value” for a type. Read more
Source§impl Message for SimpleResponse
impl Message for SimpleResponse
Source§impl PartialEq for SimpleResponse
impl PartialEq for SimpleResponse
impl StructuralPartialEq for SimpleResponse
Auto Trait Implementations§
impl Freeze for SimpleResponse
impl RefUnwindSafe for SimpleResponse
impl Send for SimpleResponse
impl Sync for SimpleResponse
impl Unpin for SimpleResponse
impl UnwindSafe for SimpleResponse
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