Struct relay_cogs::FeatureWeightsBuilder
source · 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