So basically I'd like to do something like:
pub struct Matrix<T,A:MatCollection<T>, D: Dim + ?Sized>{
pub data: A,
pub dim: D,
}
Where MatCollection is a marker trait for collections and T is supposed to be the type of said collection's contents. I want to be able to be generic over all types T, yet I don't actually use type T in my struct, so I get the error: error[E0392]: parameter T
is never used.
However, I do need type T to be able to return contents from A in the implementation of the struct.
I'm probably going about this all wrong, but I can't seem to figure out the right way to do this. I've been looking at other matrix implementations in rust and they all have clever solutions, like wrapping the collections in a new type, yet this seems like the most natural way to design this for me.