Thanks very much.
One more asking: If I use MyStruct2, how can I define a funciton as following:
fn get_part<T, N>(my_struct2: &MyStruct2<T>) -> Vec<N>
//T maybe a Vec<N> or a &Vec<N>, so the function can return Vec<N>
where
N: Clone
T: A Trait that can be indexed in, and the element is type N
{
my_struct2.data[..10].to_vec()
}