pub struct ConstraintWeightOverrides<Sc: Score> { /* private fields */ }Implementations§
Source§impl<Sc: Score> ConstraintWeightOverrides<Sc>
impl<Sc: Score> ConstraintWeightOverrides<Sc>
pub fn new() -> Self
pub fn from_pairs<I, N>(iter: I) -> Self
pub fn put<N: Into<String>>(&mut self, name: N, weight: Sc)
pub fn remove(&mut self, name: &str) -> Option<Sc>
pub fn get_or_default(&self, name: &str, default: Sc) -> Sc
pub fn get(&self, name: &str) -> Option<&Sc>
pub fn contains(&self, name: &str) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn into_arc(self) -> Arc<Self> ⓘ
Trait Implementations§
Source§impl<Sc: Score> Debug for ConstraintWeightOverrides<Sc>
impl<Sc: Score> Debug for ConstraintWeightOverrides<Sc>
Source§impl<Sc: Score> Default for ConstraintWeightOverrides<Sc>
impl<Sc: Score> Default for ConstraintWeightOverrides<Sc>
Source§impl<Sc: Score> WeightProvider<Sc> for ConstraintWeightOverrides<Sc>
impl<Sc: Score> WeightProvider<Sc> for ConstraintWeightOverrides<Sc>
Auto Trait Implementations§
impl<Sc> Freeze for ConstraintWeightOverrides<Sc>
impl<Sc> RefUnwindSafe for ConstraintWeightOverrides<Sc>
impl<Sc> Send for ConstraintWeightOverrides<Sc>
impl<Sc> Sync for ConstraintWeightOverrides<Sc>
impl<Sc> Unpin for ConstraintWeightOverrides<Sc>
impl<Sc> UnsafeUnpin for ConstraintWeightOverrides<Sc>
impl<Sc> UnwindSafe for ConstraintWeightOverrides<Sc>
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