pub struct FeatureWeightsBuilder(/* private fields */);Expand description
A builder for FeatureWeights which can be used to configure different weights per AppFeature.
Implementations§
Source§impl FeatureWeightsBuilder
impl FeatureWeightsBuilder
Sourcepub fn add_weight(&mut self, feature: AppFeature, weight: usize) -> &mut Self
pub fn add_weight(&mut self, feature: AppFeature, weight: usize) -> &mut Self
Increases the weight of an AppFeature.
Sourcepub fn weight(&mut self, feature: AppFeature, weight: usize) -> &mut Self
pub fn weight(&mut self, feature: AppFeature, weight: usize) -> &mut Self
Sets the specified weight for an AppFeature.
Sourcepub fn build(&mut self) -> FeatureWeights
pub fn build(&mut self) -> FeatureWeights
Builds and returns the FeatureWeights.
Auto Trait Implementations§
impl Freeze for FeatureWeightsBuilder
impl RefUnwindSafe for FeatureWeightsBuilder
impl Send for FeatureWeightsBuilder
impl Sync for FeatureWeightsBuilder
impl Unpin for FeatureWeightsBuilder
impl UnwindSafe for FeatureWeightsBuilder
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