Question for Rust programmers: Can the following Swift declarations be expressed in Rust?
protocol N {
associatedtype A: N
}
protocol O: N where A: O {}
The obvious thing doesn't work, but I don't know Rust:
trait N {
type A: N;
}
trait O: N where Self::A: O {}
This works, but are the two A's the same type?
trait N {
type A: N;
}
trait O: N {
type A: O;
}