#[non_exhaustive]pub struct ClassificationCategory {
pub name: String,
pub confidence: f32,
pub severity: f32,
/* private fields */
}Expand description
Represents a category returned from the text classifier.
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.name: StringThe name of the category representing the document.
confidence: f32The classifier’s confidence of the category. Number represents how certain the classifier is that this category represents the given text.
severity: f32Optional. The classifier’s severity of the category. This is only present when the ModerateTextRequest.ModelVersion is set to MODEL_VERSION_2, and the corresponding category has a severity score.
Implementations§
Trait Implementations§
Source§impl Clone for ClassificationCategory
impl Clone for ClassificationCategory
Source§fn clone(&self) -> ClassificationCategory
fn clone(&self) -> ClassificationCategory
Returns a duplicate 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 ClassificationCategory
impl Debug for ClassificationCategory
Source§impl Default for ClassificationCategory
impl Default for ClassificationCategory
Source§fn default() -> ClassificationCategory
fn default() -> ClassificationCategory
Returns the “default value” for a type. Read more
Source§impl Message for ClassificationCategory
impl Message for ClassificationCategory
Source§impl PartialEq for ClassificationCategory
impl PartialEq for ClassificationCategory
impl StructuralPartialEq for ClassificationCategory
Auto Trait Implementations§
impl Freeze for ClassificationCategory
impl RefUnwindSafe for ClassificationCategory
impl Send for ClassificationCategory
impl Sync for ClassificationCategory
impl Unpin for ClassificationCategory
impl UnwindSafe for ClassificationCategory
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