#[non_exhaustive]pub struct QuestionAnsweringHelpfulnessInput {
pub metric_spec: Option<QuestionAnsweringHelpfulnessSpec>,
pub instance: Option<QuestionAnsweringHelpfulnessInstance>,
/* private fields */
}Available on crate feature
evaluation-service only.Expand description
Input for question answering helpfulness 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<QuestionAnsweringHelpfulnessSpec>Required. Spec for question answering helpfulness score metric.
instance: Option<QuestionAnsweringHelpfulnessInstance>Required. Question answering helpfulness instance.
Implementations§
Source§impl QuestionAnsweringHelpfulnessInput
impl QuestionAnsweringHelpfulnessInput
pub fn new() -> Self
Sourcepub fn set_metric_spec<T>(self, v: T) -> Selfwhere
T: Into<QuestionAnsweringHelpfulnessSpec>,
pub fn set_metric_spec<T>(self, v: T) -> Selfwhere
T: Into<QuestionAnsweringHelpfulnessSpec>,
Sets the value of metric_spec.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::QuestionAnsweringHelpfulnessSpec;
let x = QuestionAnsweringHelpfulnessInput::new().set_metric_spec(QuestionAnsweringHelpfulnessSpec::default()/* use setters */);Sourcepub fn set_or_clear_metric_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<QuestionAnsweringHelpfulnessSpec>,
pub fn set_or_clear_metric_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<QuestionAnsweringHelpfulnessSpec>,
Sets or clears the value of metric_spec.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::QuestionAnsweringHelpfulnessSpec;
let x = QuestionAnsweringHelpfulnessInput::new().set_or_clear_metric_spec(Some(QuestionAnsweringHelpfulnessSpec::default()/* use setters */));
let x = QuestionAnsweringHelpfulnessInput::new().set_or_clear_metric_spec(None::<QuestionAnsweringHelpfulnessSpec>);Sourcepub fn set_instance<T>(self, v: T) -> Selfwhere
T: Into<QuestionAnsweringHelpfulnessInstance>,
pub fn set_instance<T>(self, v: T) -> Selfwhere
T: Into<QuestionAnsweringHelpfulnessInstance>,
Sourcepub fn set_or_clear_instance<T>(self, v: Option<T>) -> Selfwhere
T: Into<QuestionAnsweringHelpfulnessInstance>,
pub fn set_or_clear_instance<T>(self, v: Option<T>) -> Selfwhere
T: Into<QuestionAnsweringHelpfulnessInstance>,
Sets or clears the value of instance.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::QuestionAnsweringHelpfulnessInstance;
let x = QuestionAnsweringHelpfulnessInput::new().set_or_clear_instance(Some(QuestionAnsweringHelpfulnessInstance::default()/* use setters */));
let x = QuestionAnsweringHelpfulnessInput::new().set_or_clear_instance(None::<QuestionAnsweringHelpfulnessInstance>);Trait Implementations§
Source§impl Clone for QuestionAnsweringHelpfulnessInput
impl Clone for QuestionAnsweringHelpfulnessInput
Source§fn clone(&self) -> QuestionAnsweringHelpfulnessInput
fn clone(&self) -> QuestionAnsweringHelpfulnessInput
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 Default for QuestionAnsweringHelpfulnessInput
impl Default for QuestionAnsweringHelpfulnessInput
Source§fn default() -> QuestionAnsweringHelpfulnessInput
fn default() -> QuestionAnsweringHelpfulnessInput
Returns the “default value” for a type. Read more
Source§impl PartialEq for QuestionAnsweringHelpfulnessInput
impl PartialEq for QuestionAnsweringHelpfulnessInput
Source§fn eq(&self, other: &QuestionAnsweringHelpfulnessInput) -> bool
fn eq(&self, other: &QuestionAnsweringHelpfulnessInput) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for QuestionAnsweringHelpfulnessInput
Auto Trait Implementations§
impl Freeze for QuestionAnsweringHelpfulnessInput
impl RefUnwindSafe for QuestionAnsweringHelpfulnessInput
impl Send for QuestionAnsweringHelpfulnessInput
impl Sync for QuestionAnsweringHelpfulnessInput
impl Unpin for QuestionAnsweringHelpfulnessInput
impl UnwindSafe for QuestionAnsweringHelpfulnessInput
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