1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use super::{Seq, CollectionMut, GetMut, Insert, Remove};


pub trait SeqMut<'a, V: 'a>:
    Seq<'a, V> +
    CollectionMut +
    GetMut<usize, Output = V> +
    Insert<usize, V, Output = ()> +
    Remove<usize, Output = V> +

    where &'a Self: 'a + IntoIterator<Item = &'a V>,
          &'a mut Self: 'a + IntoIterator<Item = &'a mut V>,
          V: 'a + ?Sized,
{}


impl<'a, V, T> SeqMut<'a, V> for T
    where T: 'a +
            Seq<'a, V> +
            CollectionMut +
            GetMut<usize, Output = V> +
            Insert<usize, V, Output = ()> +
            Remove<usize, Output = V>,
          &'a T: 'a + IntoIterator<Item = &'a V>,
          &'a mut T: 'a + IntoIterator<Item = &'a mut V>,
          V: 'a + ?Sized,
{}