pub struct ModerationCategories {Show 13 fields
pub hate: bool,
pub hate_threatening: bool,
pub harassment: bool,
pub harassment_threatening: bool,
pub self_harm: bool,
pub self_harm_intent: bool,
pub self_harm_instructions: bool,
pub sexual: bool,
pub sexual_minors: bool,
pub violence: bool,
pub violence_graphic: bool,
pub illicit: Option<bool>,
pub illicit_violent: Option<bool>,
}Expand description
Category flags for content moderation.
Each field indicates whether that category of content was detected.
Fields§
§hate: boolContent that expresses, incites, or promotes hate based on identity
hate_threatening: boolHateful content that also includes violence or threat
harassment: boolContent that expresses, incites, or promotes harassing language
harassment_threatening: boolHarassment content that also includes violence or threat
self_harm: boolContent that promotes, encourages, or depicts self-harm
self_harm_intent: boolContent indicating intent to commit self-harm
self_harm_instructions: boolContent that provides instructions for self-harm
sexual: boolSexual content
sexual_minors: boolSexual content involving minors
violence: boolContent that depicts violence
violence_graphic: boolViolent content that is graphic or gory
illicit: Option<bool>Content that is illicit (newer models only)
illicit_violent: Option<bool>Illicit content that includes violence (newer models only)
Trait Implementations§
Source§impl Clone for ModerationCategories
impl Clone for ModerationCategories
Source§fn clone(&self) -> ModerationCategories
fn clone(&self) -> ModerationCategories
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ModerationCategories
impl Debug for ModerationCategories
Source§impl<'de> Deserialize<'de> for ModerationCategories
impl<'de> Deserialize<'de> for ModerationCategories
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
Auto Trait Implementations§
impl Freeze for ModerationCategories
impl RefUnwindSafe for ModerationCategories
impl Send for ModerationCategories
impl Sync for ModerationCategories
impl Unpin for ModerationCategories
impl UnsafeUnpin for ModerationCategories
impl UnwindSafe for ModerationCategories
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