#[non_exhaustive]pub struct MetricxSpec {
pub version: Option<MetricxVersion>,
pub source_language: String,
pub target_language: String,
/* private fields */
}Available on crate feature
evaluation-service only.Expand description
Spec for MetricX 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.version: Option<MetricxVersion>Required. Which version to use for evaluation.
source_language: StringOptional. Source language in BCP-47 format.
target_language: StringOptional. Target language in BCP-47 format. Covers both prediction and reference.
Implementations§
Source§impl MetricxSpec
impl MetricxSpec
pub fn new() -> Self
Sourcepub fn set_version<T>(self, v: T) -> Selfwhere
T: Into<MetricxVersion>,
pub fn set_version<T>(self, v: T) -> Selfwhere
T: Into<MetricxVersion>,
Sets the value of version.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::metricx_spec::MetricxVersion;
let x0 = MetricxSpec::new().set_version(MetricxVersion::Metricx24Ref);
let x1 = MetricxSpec::new().set_version(MetricxVersion::Metricx24Src);
let x2 = MetricxSpec::new().set_version(MetricxVersion::Metricx24SrcRef);Sourcepub fn set_or_clear_version<T>(self, v: Option<T>) -> Selfwhere
T: Into<MetricxVersion>,
pub fn set_or_clear_version<T>(self, v: Option<T>) -> Selfwhere
T: Into<MetricxVersion>,
Sets or clears the value of version.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::metricx_spec::MetricxVersion;
let x0 = MetricxSpec::new().set_or_clear_version(Some(MetricxVersion::Metricx24Ref));
let x1 = MetricxSpec::new().set_or_clear_version(Some(MetricxVersion::Metricx24Src));
let x2 = MetricxSpec::new().set_or_clear_version(Some(MetricxVersion::Metricx24SrcRef));
let x_none = MetricxSpec::new().set_or_clear_version(None::<MetricxVersion>);Sourcepub fn set_source_language<T: Into<String>>(self, v: T) -> Self
pub fn set_source_language<T: Into<String>>(self, v: T) -> Self
Sets the value of source_language.
§Example
ⓘ
let x = MetricxSpec::new().set_source_language("example");Sourcepub fn set_target_language<T: Into<String>>(self, v: T) -> Self
pub fn set_target_language<T: Into<String>>(self, v: T) -> Self
Sets the value of target_language.
§Example
ⓘ
let x = MetricxSpec::new().set_target_language("example");Trait Implementations§
Source§impl Clone for MetricxSpec
impl Clone for MetricxSpec
Source§fn clone(&self) -> MetricxSpec
fn clone(&self) -> MetricxSpec
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 MetricxSpec
impl Debug for MetricxSpec
Source§impl Default for MetricxSpec
impl Default for MetricxSpec
Source§fn default() -> MetricxSpec
fn default() -> MetricxSpec
Returns the “default value” for a type. Read more
Source§impl Message for MetricxSpec
impl Message for MetricxSpec
Source§impl PartialEq for MetricxSpec
impl PartialEq for MetricxSpec
impl StructuralPartialEq for MetricxSpec
Auto Trait Implementations§
impl Freeze for MetricxSpec
impl RefUnwindSafe for MetricxSpec
impl Send for MetricxSpec
impl Sync for MetricxSpec
impl Unpin for MetricxSpec
impl UnwindSafe for MetricxSpec
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