#[non_exhaustive]pub struct AnalyzeSentimentResponse {
pub document_sentiment: Option<Sentiment>,
pub language_code: String,
pub sentences: Vec<Sentence>,
pub language_supported: bool,
}Expand description
The sentiment analysis response message.
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.document_sentiment: Option<Sentiment>The overall sentiment of the input document.
language_code: StringThe language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See [Document.language][] field for more details.
sentences: Vec<Sentence>The sentiment for all the sentences in the document.
language_supported: boolWhether the language is officially supported. The API may still return a response when the language is not supported, but it is on a best effort basis.
Implementations§
Source§impl AnalyzeSentimentResponse
impl AnalyzeSentimentResponse
Sourcepub fn set_document_sentiment<T: Into<Option<Sentiment>>>(self, v: T) -> Self
pub fn set_document_sentiment<T: Into<Option<Sentiment>>>(self, v: T) -> Self
Sets the value of document_sentiment.
Sourcepub fn set_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_language_code<T: Into<String>>(self, v: T) -> Self
Sets the value of language_code.
Sourcepub fn set_language_supported<T: Into<bool>>(self, v: T) -> Self
pub fn set_language_supported<T: Into<bool>>(self, v: T) -> Self
Sets the value of language_supported.
Sourcepub fn set_sentences<T, V>(self, v: T) -> Self
pub fn set_sentences<T, V>(self, v: T) -> Self
Sets the value of sentences.
Trait Implementations§
Source§impl Clone for AnalyzeSentimentResponse
impl Clone for AnalyzeSentimentResponse
Source§fn clone(&self) -> AnalyzeSentimentResponse
fn clone(&self) -> AnalyzeSentimentResponse
Returns a copy 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 AnalyzeSentimentResponse
impl Debug for AnalyzeSentimentResponse
Source§impl Default for AnalyzeSentimentResponse
impl Default for AnalyzeSentimentResponse
Source§fn default() -> AnalyzeSentimentResponse
fn default() -> AnalyzeSentimentResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AnalyzeSentimentResponsewhere
AnalyzeSentimentResponse: Default,
impl<'de> Deserialize<'de> for AnalyzeSentimentResponsewhere
AnalyzeSentimentResponse: Default,
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
Source§impl Message for AnalyzeSentimentResponse
impl Message for AnalyzeSentimentResponse
Source§impl PartialEq for AnalyzeSentimentResponse
impl PartialEq for AnalyzeSentimentResponse
Source§impl Serialize for AnalyzeSentimentResponse
impl Serialize for AnalyzeSentimentResponse
impl StructuralPartialEq for AnalyzeSentimentResponse
Auto Trait Implementations§
impl Freeze for AnalyzeSentimentResponse
impl RefUnwindSafe for AnalyzeSentimentResponse
impl Send for AnalyzeSentimentResponse
impl Sync for AnalyzeSentimentResponse
impl Unpin for AnalyzeSentimentResponse
impl UnwindSafe for AnalyzeSentimentResponse
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