#[non_exhaustive]pub struct PointwiseMetricSpec {
pub metric_prompt_template: Option<String>,
/* private fields */
}Available on crate feature
evaluation-service only.Expand description
Spec for pointwise 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_prompt_template: Option<String>Required. Metric prompt template for pointwise metric.
Implementations§
Source§impl PointwiseMetricSpec
impl PointwiseMetricSpec
pub fn new() -> Self
Sourcepub fn set_metric_prompt_template<T>(self, v: T) -> Self
pub fn set_metric_prompt_template<T>(self, v: T) -> Self
Sets the value of metric_prompt_template.
§Example
ⓘ
let x = PointwiseMetricSpec::new().set_metric_prompt_template("example");Sourcepub fn set_or_clear_metric_prompt_template<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_metric_prompt_template<T>(self, v: Option<T>) -> Self
Sets or clears the value of metric_prompt_template.
§Example
ⓘ
let x = PointwiseMetricSpec::new().set_or_clear_metric_prompt_template(Some("example"));
let x = PointwiseMetricSpec::new().set_or_clear_metric_prompt_template(None::<String>);Trait Implementations§
Source§impl Clone for PointwiseMetricSpec
impl Clone for PointwiseMetricSpec
Source§fn clone(&self) -> PointwiseMetricSpec
fn clone(&self) -> PointwiseMetricSpec
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 PointwiseMetricSpec
impl Debug for PointwiseMetricSpec
Source§impl Default for PointwiseMetricSpec
impl Default for PointwiseMetricSpec
Source§fn default() -> PointwiseMetricSpec
fn default() -> PointwiseMetricSpec
Returns the “default value” for a type. Read more
Source§impl Message for PointwiseMetricSpec
impl Message for PointwiseMetricSpec
Source§impl PartialEq for PointwiseMetricSpec
impl PartialEq for PointwiseMetricSpec
impl StructuralPartialEq for PointwiseMetricSpec
Auto Trait Implementations§
impl Freeze for PointwiseMetricSpec
impl RefUnwindSafe for PointwiseMetricSpec
impl Send for PointwiseMetricSpec
impl Sync for PointwiseMetricSpec
impl Unpin for PointwiseMetricSpec
impl UnwindSafe for PointwiseMetricSpec
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