#[non_exhaustive]pub struct SafetyInput {
pub metric_spec: Option<SafetySpec>,
pub instance: Option<SafetyInstance>,
/* private fields */
}Available on crate feature
evaluation-service only.Expand description
Input for safety metric.
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.metric_spec: Option<SafetySpec>Required. Spec for safety metric.
instance: Option<SafetyInstance>Required. Safety instance.
Implementations§
Source§impl SafetyInput
impl SafetyInput
pub fn new() -> Self
Sourcepub fn set_metric_spec<T>(self, v: T) -> Selfwhere
T: Into<SafetySpec>,
pub fn set_metric_spec<T>(self, v: T) -> Selfwhere
T: Into<SafetySpec>,
Sets the value of metric_spec.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::SafetySpec;
let x = SafetyInput::new().set_metric_spec(SafetySpec::default()/* use setters */);Sourcepub fn set_or_clear_metric_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetySpec>,
pub fn set_or_clear_metric_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetySpec>,
Sets or clears the value of metric_spec.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::SafetySpec;
let x = SafetyInput::new().set_or_clear_metric_spec(Some(SafetySpec::default()/* use setters */));
let x = SafetyInput::new().set_or_clear_metric_spec(None::<SafetySpec>);Sourcepub fn set_instance<T>(self, v: T) -> Selfwhere
T: Into<SafetyInstance>,
pub fn set_instance<T>(self, v: T) -> Selfwhere
T: Into<SafetyInstance>,
Sourcepub fn set_or_clear_instance<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetyInstance>,
pub fn set_or_clear_instance<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetyInstance>,
Trait Implementations§
Source§impl Clone for SafetyInput
impl Clone for SafetyInput
Source§fn clone(&self) -> SafetyInput
fn clone(&self) -> SafetyInput
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 SafetyInput
impl Debug for SafetyInput
Source§impl Default for SafetyInput
impl Default for SafetyInput
Source§fn default() -> SafetyInput
fn default() -> SafetyInput
Returns the “default value” for a type. Read more
Source§impl Message for SafetyInput
impl Message for SafetyInput
Source§impl PartialEq for SafetyInput
impl PartialEq for SafetyInput
impl StructuralPartialEq for SafetyInput
Auto Trait Implementations§
impl Freeze for SafetyInput
impl RefUnwindSafe for SafetyInput
impl Send for SafetyInput
impl Sync for SafetyInput
impl Unpin for SafetyInput
impl UnwindSafe for SafetyInput
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