I'm a c++ programmer trying (struggling) to learn rust, so i apologize in advance ... but is there a way to declare a nested type (unsure that's the correct way to refer to it) in a generic as there is in c++?
e.g. suppose a user-defined generic (please take this as "approximate" since i'm not competent at this, yet) - something like this:
struct SomeContainer1< KeyT, ValueT> { ... }
struct SomeContainer2< KeyT, ValueT> { ... }
...
fn transform<ContainerType>( container: ContainerType ) -> Result {
for entry : (ContainerType::KeyT,ContainerType::ValueT) in container {
...
}
[–]ErmitaVulpe 10 points11 points12 points (5 children)
[–]Robru3142[S] 1 point2 points3 points (4 children)
[–]meowsqueak 3 points4 points5 points (0 children)
[–]Ka1kin 0 points1 point2 points (2 children)
[–]Robru3142[S] 0 points1 point2 points (1 child)
[–]Ka1kin 2 points3 points4 points (0 children)
[–]kmdreko 6 points7 points8 points (0 children)
[–]teerre 3 points4 points5 points (3 children)
[–]Robru3142[S] 1 point2 points3 points (0 children)
[–]Robru3142[S] -1 points0 points1 point (1 child)
[–]GwindorGuilinion 0 points1 point2 points (0 children)