#[non_exhaustive]pub struct Sentence {
pub text: Option<TextSpan>,
pub sentiment: Option<Sentiment>,
/* private fields */
}Expand description
Represents a sentence in the input document.
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: Option<TextSpan>The sentence text.
sentiment: Option<Sentiment>For calls to [AnalyzeSentiment][] or if AnnotateTextRequest.Features.extract_document_sentiment is set to true, this field will contain the sentiment for the sentence.
Implementations§
Source§impl Sentence
impl Sentence
pub fn new() -> Self
Sourcepub fn set_or_clear_text<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_text<T>(self, v: Option<T>) -> Self
Sourcepub fn set_sentiment<T>(self, v: T) -> Self
pub fn set_sentiment<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_sentiment<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_sentiment<T>(self, v: Option<T>) -> Self
Trait Implementations§
impl StructuralPartialEq for Sentence
Auto Trait Implementations§
impl Freeze for Sentence
impl RefUnwindSafe for Sentence
impl Send for Sentence
impl Sync for Sentence
impl Unpin for Sentence
impl UnwindSafe for Sentence
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