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

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

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

impl<T: PartialEq + Clone> Union for Vec<T>
[src]

[src]

Implementors