Struct SafetyRating
pub struct SafetyRating {
pub category: HarmCategory,
pub probability: HarmProbability,
pub blocked: bool,
}Expand description
Per-category safety assessment of generated content.
Fields§
§category: HarmCategoryWhich harm category was assessed.
probability: HarmProbabilityProbability of harmful content.
blocked: boolWhether the content was blocked.
Trait Implementations§
§impl Clone for SafetyRating
impl Clone for SafetyRating
§fn clone(&self) -> SafetyRating
fn clone(&self) -> SafetyRating
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 more§impl Debug for SafetyRating
impl Debug for SafetyRating
§impl<'de> Deserialize<'de> for SafetyRating
impl<'de> Deserialize<'de> for SafetyRating
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SafetyRating, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SafetyRating, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for SafetyRating
impl Serialize for SafetyRating
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SafetyRating
impl RefUnwindSafe for SafetyRating
impl Send for SafetyRating
impl Sync for SafetyRating
impl Unpin for SafetyRating
impl UnwindSafe for SafetyRating
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