pub fn symmetric_difference<'a>(
        &'a self,
        other: &'a LinkedHashSet<T, S>,
    ) -> SymmetricDifference<'a, T, S> {
        SymmetricDifference {
            iter: self.difference(other).chain(other.difference(self)),
        }
    }
/// Visits the values representing the symmetric difference,
/// i.e. the values that are in `self` or in `other` but not in both.
///
/// # Examples
///
/// ```
/// use linked_hash_set::LinkedHashSet;
/// let a: LinkedHashSet<_> = [1, 2, 3].iter().cloned().collect();
/// let b: LinkedHashSet<_> = [4, 2, 3, 4].iter().cloned().collect();
///
/// // Print 1, 4 in insertion order.
/// for x in a.symmetric_difference(&b) {
///     println!("{}", x);
/// }
///
/// let diff1: LinkedHashSet<_> = a.symmetric_difference(&b).collect();
/// let diff2: LinkedHashSet<_> = b.symmetric_difference(&a).collect();
///
/// assert_eq!(diff1, diff2);
/// assert_eq!(diff1, [1, 4].iter().collect());
/// ```
Visits the values representing the symmetric difference,
i.e. the values that are in `self` or in `other` but not in both.
Visits the values representing the symmetric difference i . e . the values that are in ` self ` or in ` other ` but not in both .
pub fn symmetric_difference<'a>(
        &'a self,
        other: &'a LinkedHashSet<T, S>,
    ) -> SymmetricDifference<'a, T, S> {
        SymmetricDifference {
            iter: self.difference(other).chain(other.difference(self)),
        }
    }
pub fn symmetric_difference < ' a > ( & ' a self , other : & ' a LinkedHashSet < T , S > , ) -> SymmetricDifference < ' a , T , S > { SymmetricDifference { iter : self . difference ( other ) . chain ( other . difference ( self ) ) , } }
Visits the values representing the symmetric difference,
i.e.
Visits the values representing the symmetric difference i . e .
&'a self
other
&'a LinkedHashSet<T, S>
&'a self
other
&'a LinkedHashSet<T, S>
examples


Print 1, 4 in insertion order.
for x in a.symmetric_difference(&b) {
println!("{}", x);
}

let diff1: LinkedHashSet<_> = a.symmetric_difference(&b).collect();
let diff2: LinkedHashSet<_> = b.symmetric_difference(&a).collect().


Print 1 4 in insertion order . for x in a . symmetric_difference ( &b ) { println! ( " {} " x ) ; } let diff1 : LinkedHashSet<_ > = a . symmetric_difference ( &b ) . collect () ; let diff2 : LinkedHashSet<_ > = b . symmetric_difference ( &a ) . collect () .