#[non_exhaustive]pub struct Features {
pub extract_entities: bool,
pub extract_document_sentiment: bool,
pub classify_text: bool,
pub moderate_text: bool,
}Expand description
All available features. Setting each one to true will enable that specific analysis for the input.
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.extract_entities: boolOptional. Extract entities.
extract_document_sentiment: boolOptional. Extract document-level sentiment.
classify_text: boolOptional. Classify the full document into categories.
moderate_text: boolOptional. Moderate the document for harmful and sensitive categories.
Implementations§
Source§impl Features
impl Features
Sourcepub fn set_extract_entities<T: Into<bool>>(self, v: T) -> Self
pub fn set_extract_entities<T: Into<bool>>(self, v: T) -> Self
Sets the value of extract_entities.
Sourcepub fn set_extract_document_sentiment<T: Into<bool>>(self, v: T) -> Self
pub fn set_extract_document_sentiment<T: Into<bool>>(self, v: T) -> Self
Sets the value of extract_document_sentiment.
Sourcepub fn set_classify_text<T: Into<bool>>(self, v: T) -> Self
pub fn set_classify_text<T: Into<bool>>(self, v: T) -> Self
Sets the value of classify_text.
Sourcepub fn set_moderate_text<T: Into<bool>>(self, v: T) -> Self
pub fn set_moderate_text<T: Into<bool>>(self, v: T) -> Self
Sets the value of moderate_text.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Features
impl<'de> Deserialize<'de> for Features
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 StructuralPartialEq for Features
Auto Trait Implementations§
impl Freeze for Features
impl RefUnwindSafe for Features
impl Send for Features
impl Sync for Features
impl Unpin for Features
impl UnwindSafe for Features
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