MutSetOps

Trait MutSetOps 

Source
pub trait MutSetOps<T> {
Show 13 methods // Required methods fn munordered(&mut self); fn mordered(&mut self, quantify: impl Copy + Fn(&T) -> f64, asc: bool); fn mindexed(&mut self, quantify: impl Copy + Fn(&T) -> f64, asc: bool); fn mranked(&mut self, asc: bool); fn msame(&mut self, s: &mut Self, quantify: impl Copy + Fn(&T) -> f64); fn mdelete(&mut self, item: T) -> bool; fn mdeleteall(&mut self, item: T) -> usize; fn minsert(&mut self, item: T); fn mreverse(&mut self); fn mnonrepeat(&mut self); fn munion(&mut self, s: &Self); fn mintersection(&mut self, s: &Self); fn mdifference(&mut self, s: &Self);
}
Expand description

Mutable methods for &mut Set

Required Methods§

Source

fn munordered(&mut self)

Makes a Set unordered

Source

fn mordered(&mut self, quantify: impl Copy + Fn(&T) -> f64, asc: bool)

Makes a Set ordered

Source

fn mindexed(&mut self, quantify: impl Copy + Fn(&T) -> f64, asc: bool)

Makes any Set indexed

Source

fn mranked(&mut self, asc: bool)

Converts any Set type to ranked

Source

fn msame(&mut self, s: &mut Self, quantify: impl Copy + Fn(&T) -> f64)

General converter: s -> Set of the same type and order as self

Source

fn mdelete(&mut self, item: T) -> bool

Deletes the first item from self

Source

fn mdeleteall(&mut self, item: T) -> usize

Deletes all occurrences of a matching item from self, returns their count

Source

fn minsert(&mut self, item: T)

Inserts an item of the same end-type to self

Source

fn mreverse(&mut self)

reverses the vector of explicit sets and index of indexed sets

Source

fn mnonrepeat(&mut self)

Deletes all repetitions

Source

fn munion(&mut self, s: &Self)

Union of two sets of the same type

Source

fn mintersection(&mut self, s: &Self)

Intersection of two sets of the same type

Source

fn mdifference(&mut self, s: &Self)

Removing s from self (i.e. self-s)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> MutSetOps<T> for Set<T>
where T: Copy + PartialOrd + Default,