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: Clone + Score> Clone for ConstraintWeightOverrides<Sc>
impl<Sc: Clone + Score> Clone for ConstraintWeightOverrides<Sc>
Source§fn clone(&self) -> ConstraintWeightOverrides<Sc>
fn clone(&self) -> ConstraintWeightOverrides<Sc>
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<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>where
Sc: RefUnwindSafe,
impl<Sc> Send for ConstraintWeightOverrides<Sc>
impl<Sc> Sync for ConstraintWeightOverrides<Sc>
impl<Sc> Unpin for ConstraintWeightOverrides<Sc>where
Sc: Unpin,
impl<Sc> UnsafeUnpin for ConstraintWeightOverrides<Sc>
impl<Sc> UnwindSafe for ConstraintWeightOverrides<Sc>where
Sc: UnwindSafe,
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