#[non_exhaustive]pub struct OptimizationObjectiveConfig {
pub target_field: String,
pub target_field_value_float: f32,
/* private fields */
}Available on crate feature
engine-service only.Expand description
Custom threshold for cvr optimization_objective.
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.target_field: StringRequired. The name of the field to target. Currently supported
values: watch-percentage, watch-time.
target_field_value_float: f32Required. The threshold to be applied to the target (e.g., 0.5).
Implementations§
Source§impl OptimizationObjectiveConfig
impl OptimizationObjectiveConfig
pub fn new() -> Self
Sourcepub fn set_target_field<T: Into<String>>(self, v: T) -> Self
pub fn set_target_field<T: Into<String>>(self, v: T) -> Self
Sets the value of target_field.
§Example
ⓘ
let x = OptimizationObjectiveConfig::new().set_target_field("example");Sourcepub fn set_target_field_value_float<T: Into<f32>>(self, v: T) -> Self
pub fn set_target_field_value_float<T: Into<f32>>(self, v: T) -> Self
Sets the value of target_field_value_float.
§Example
ⓘ
let x = OptimizationObjectiveConfig::new().set_target_field_value_float(42.0);Trait Implementations§
Source§impl Clone for OptimizationObjectiveConfig
impl Clone for OptimizationObjectiveConfig
Source§fn clone(&self) -> OptimizationObjectiveConfig
fn clone(&self) -> OptimizationObjectiveConfig
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 OptimizationObjectiveConfig
impl Debug for OptimizationObjectiveConfig
Source§impl Default for OptimizationObjectiveConfig
impl Default for OptimizationObjectiveConfig
Source§fn default() -> OptimizationObjectiveConfig
fn default() -> OptimizationObjectiveConfig
Returns the “default value” for a type. Read more
impl StructuralPartialEq for OptimizationObjectiveConfig
Auto Trait Implementations§
impl Freeze for OptimizationObjectiveConfig
impl RefUnwindSafe for OptimizationObjectiveConfig
impl Send for OptimizationObjectiveConfig
impl Sync for OptimizationObjectiveConfig
impl Unpin for OptimizationObjectiveConfig
impl UnwindSafe for OptimizationObjectiveConfig
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