pub struct SafetyRating {
pub blocked: Option<bool>,
pub category: Option<HarmCategory>,
pub probability: Option<HarmProbability>,
pub probability_score: Option<f64>,
pub severity: Option<HarmSeverity>,
pub severity_score: Option<f64>,
}Fields§
§blocked: Option<bool>§category: Option<HarmCategory>§probability: Option<HarmProbability>§probability_score: Option<f64>§severity: Option<HarmSeverity>§severity_score: Option<f64>Implementations§
Source§impl SafetyRating
impl SafetyRating
Sourcepub fn category(self, value: impl Into<HarmCategory>) -> Self
pub fn category(self, value: impl Into<HarmCategory>) -> Self
Sets the category field of this struct.
Sourcepub fn probability(self, value: impl Into<HarmProbability>) -> Self
pub fn probability(self, value: impl Into<HarmProbability>) -> Self
Sets the probability field of this struct.
Sourcepub fn probability_score(self, value: impl Into<f64>) -> Self
pub fn probability_score(self, value: impl Into<f64>) -> Self
Sets the probability_score field of this struct.
Sourcepub fn severity(self, value: impl Into<HarmSeverity>) -> Self
pub fn severity(self, value: impl Into<HarmSeverity>) -> Self
Sets the severity field of this struct.
Sourcepub fn severity_score(self, value: impl Into<f64>) -> Self
pub fn severity_score(self, value: impl Into<f64>) -> Self
Sets the severity_score field of this struct.
Trait Implementations§
Source§impl Clone for SafetyRating
impl Clone for SafetyRating
Source§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 moreSource§impl Debug for SafetyRating
impl Debug for SafetyRating
Source§impl Default for SafetyRating
impl Default for SafetyRating
Source§fn default() -> SafetyRating
fn default() -> SafetyRating
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SafetyRating
impl<'de> Deserialize<'de> for SafetyRating
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 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