Trait array_tool::vec::Union[][src]

pub trait Union {
    fn union(&self, other: Self) -> Self;
}
Expand description

Create a union between two vectors. Returns a new vector by joining with other, excluding any duplicates and preserving the order from the original vector.

Required methods

Example

use array_tool::vec::Union;

vec!["a","b","c"].union(vec!["c","d","a"]);

Output

vec![ "a", "b", "c", "d" ]

Implementations on Foreign Types

Implementors