pub enum HarmBlockThreshold {
Unspecified,
Low,
Medium,
High,
None,
}Expand description
Probability of harm which causes content to be blocked.
When provided in [SafetySetting.threshold], a predicted harm probability at or above this level will block content from being returned.
Variants§
Unspecified
Threshold is unspecified, block using default threshold.
Low
Block when medium or high probability of unsafe content.
Medium
Block when medium or high probability of unsafe content.
High
Block when high probability of unsafe content.
None
Always show regardless of probability of unsafe content.
Trait Implementations§
Source§impl Clone for HarmBlockThreshold
impl Clone for HarmBlockThreshold
Source§fn clone(&self) -> HarmBlockThreshold
fn clone(&self) -> HarmBlockThreshold
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 HarmBlockThreshold
impl Debug for HarmBlockThreshold
Source§impl<'de> Deserialize<'de> for HarmBlockThreshold
impl<'de> Deserialize<'de> for HarmBlockThreshold
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 HarmBlockThreshold
impl RefUnwindSafe for HarmBlockThreshold
impl Send for HarmBlockThreshold
impl Sync for HarmBlockThreshold
impl Unpin for HarmBlockThreshold
impl UnwindSafe for HarmBlockThreshold
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