pub struct Request {
pub version: String,
pub session: Option<Session>,
pub body: ReqBody,
pub context: Context,
}
Expand description
Request struct corresponding to the Alexa spec
Fields§
§version: String
§session: Option<Session>
§body: ReqBody
§context: Context
Implementations§
Source§impl Request
impl Request
Sourcepub fn intent(&self) -> IntentType
pub fn intent(&self) -> IntentType
Extracts the intent from the request
Sourcepub fn slot_value(&self, slot: &str) -> Option<String>
pub fn slot_value(&self, slot: &str) -> Option<String>
retrieves the string value of named slot from the request, if it exists
Sourcepub fn attribute_value(&self, key: &str) -> Option<&String>
pub fn attribute_value(&self, key: &str) -> Option<&String>
retrieves the attribute value with the given key, if it exists
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
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 Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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