Struct aws_sdk_comprehend::types::ToxicLabels
source · #[non_exhaustive]pub struct ToxicLabels {
pub labels: Option<Vec<ToxicContent>>,
pub toxicity: Option<f32>,
}Expand description
Toxicity analysis result for one string. For more information about toxicity detection, see Toxicity detection in the Amazon Comprehend Developer Guide.
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.labels: Option<Vec<ToxicContent>>Array of toxic content types identified in the string.
toxicity: Option<f32>Overall toxicity score for the string. Value range is zero to one, where one is the highest confidence.
Implementations§
source§impl ToxicLabels
impl ToxicLabels
sourcepub fn labels(&self) -> &[ToxicContent]
pub fn labels(&self) -> &[ToxicContent]
Array of toxic content types identified in the string.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .labels.is_none().
source§impl ToxicLabels
impl ToxicLabels
sourcepub fn builder() -> ToxicLabelsBuilder
pub fn builder() -> ToxicLabelsBuilder
Creates a new builder-style object to manufacture ToxicLabels.
Trait Implementations§
source§impl Clone for ToxicLabels
impl Clone for ToxicLabels
source§fn clone(&self) -> ToxicLabels
fn clone(&self) -> ToxicLabels
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 ToxicLabels
impl Debug for ToxicLabels
source§impl PartialEq for ToxicLabels
impl PartialEq for ToxicLabels
source§fn eq(&self, other: &ToxicLabels) -> bool
fn eq(&self, other: &ToxicLabels) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for ToxicLabels
Auto Trait Implementations§
impl Freeze for ToxicLabels
impl RefUnwindSafe for ToxicLabels
impl Send for ToxicLabels
impl Sync for ToxicLabels
impl Unpin for ToxicLabels
impl UnwindSafe for ToxicLabels
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.