Trait Split

Source
pub trait Split<Src>
where Self: Sized,
{ // Required method fn split(self, partition: &[usize], num_parts: usize) -> Vec<Self>; // Provided methods fn split_by_attrib<T: AttributeValueHash>(self, attrib: &str) -> Vec<Self> where Self: Attrib, Src: AttribIndex<Self> { ... } fn split_by_attrib_ord<T: PartialOrd + AttributeValue>( self, attrib: &str, ) -> Vec<Self> where Self: Attrib, Src: AttribIndex<Self> { ... } }
Expand description

Split the object at the Src topology (e.g. vertices) into multiple objects of the same type.

Required Methods§

Source

fn split(self, partition: &[usize], num_parts: usize) -> Vec<Self>

Provided Methods§

Source

fn split_by_attrib<T: AttributeValueHash>(self, attrib: &str) -> Vec<Self>
where Self: Attrib, Src: AttribIndex<Self>,

Split the mesh using a given attribute whose type implements Hash and Eq.

It is a short-hand to calling partition_by_attrib followed by a split.

Source

fn split_by_attrib_ord<T: PartialOrd + AttributeValue>( self, attrib: &str, ) -> Vec<Self>
where Self: Attrib, Src: AttribIndex<Self>,

Split the mesh using a given attribute whose type implements PartialOrd.

It is a short-hand to calling partition_by_attrib_by_sort followed by a split. In contrast to split_by_attrib_hash, this function works for floating point types.

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§