pub struct SmartComposeResponse {
pub suggestion: String,
}Expand description
Response from Smart Compose API (REST mode).
§Example
let json = json!({
"suggestion": "Dear John,\n\nI hope this email finds you well..."
});
let response: SmartComposeResponse = serde_json::from_value(json).unwrap();
assert!(response.suggestion.contains("Dear John"));Fields§
§suggestion: StringAI-generated message content.
Trait Implementations§
Source§impl Clone for SmartComposeResponse
impl Clone for SmartComposeResponse
Source§fn clone(&self) -> SmartComposeResponse
fn clone(&self) -> SmartComposeResponse
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 SmartComposeResponse
impl Debug for SmartComposeResponse
Source§impl<'de> Deserialize<'de> for SmartComposeResponse
impl<'de> Deserialize<'de> for SmartComposeResponse
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
impl Eq for SmartComposeResponse
Source§impl PartialEq for SmartComposeResponse
impl PartialEq for SmartComposeResponse
Source§fn eq(&self, other: &SmartComposeResponse) -> bool
fn eq(&self, other: &SmartComposeResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SmartComposeResponse
impl Serialize for SmartComposeResponse
impl StructuralPartialEq for SmartComposeResponse
Auto Trait Implementations§
impl Freeze for SmartComposeResponse
impl RefUnwindSafe for SmartComposeResponse
impl Send for SmartComposeResponse
impl Sync for SmartComposeResponse
impl Unpin for SmartComposeResponse
impl UnsafeUnpin for SmartComposeResponse
impl UnwindSafe for SmartComposeResponse
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