#[non_exhaustive]pub struct BoostSpec {
pub condition_boost_specs: Vec<ConditionBoostSpec>,
pub skip_boost_spec_validation: Option<bool>,
/* private fields */
}Expand description
Boost specification to boost certain items.
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.condition_boost_specs: Vec<ConditionBoostSpec>Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
skip_boost_spec_validation: Option<bool>Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.
Implementations§
Source§impl BoostSpec
impl BoostSpec
Sourcepub fn set_condition_boost_specs<T, V>(self, v: T) -> Self
pub fn set_condition_boost_specs<T, V>(self, v: T) -> Self
Sets the value of condition_boost_specs.
§Example
ⓘ
use google_cloud_retail_v2::model::search_request::boost_spec::ConditionBoostSpec;
let x = BoostSpec::new()
.set_condition_boost_specs([
ConditionBoostSpec::default()/* use setters */,
ConditionBoostSpec::default()/* use (different) setters */,
]);Sourcepub fn set_skip_boost_spec_validation<T>(self, v: T) -> Self
pub fn set_skip_boost_spec_validation<T>(self, v: T) -> Self
Sets the value of skip_boost_spec_validation.
§Example
ⓘ
let x = BoostSpec::new().set_skip_boost_spec_validation(true);Sourcepub fn set_or_clear_skip_boost_spec_validation<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_skip_boost_spec_validation<T>(self, v: Option<T>) -> Self
Sets or clears the value of skip_boost_spec_validation.
§Example
ⓘ
let x = BoostSpec::new().set_or_clear_skip_boost_spec_validation(Some(false));
let x = BoostSpec::new().set_or_clear_skip_boost_spec_validation(None::<bool>);Trait Implementations§
impl StructuralPartialEq for BoostSpec
Auto Trait Implementations§
impl Freeze for BoostSpec
impl RefUnwindSafe for BoostSpec
impl Send for BoostSpec
impl Sync for BoostSpec
impl Unpin for BoostSpec
impl UnsafeUnpin for BoostSpec
impl UnwindSafe for BoostSpec
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