No, it does not. It has some support for types which depend on constant values (i.e. values known at compile time), but not types that depend on runtime values, which is the real power of dependent types.
There are literally talks on YouTube about using dependent types in Rust. In fact that is how I stumbled over the topic in the first place. So yes, it does. Just not in a convenient way, as I already mentioned.
I would love to see OP's code ported to Rust.
Can you link to one of these talks? I'm absolutely certain that Rust does not have dependent types.