Suppose we have:
trait Foo {
type A;
type B;
}
Does Rust allow us to express additional constraints, i.e. "B impls some trait [that takes A as a generic argument]"
Suppose we have:
trait Foo {
type A;
type B;
}
Does Rust allow us to express additional constraints, i.e. "B impls some trait [that takes A as a generic argument]"
trait Foo {
type A;
type B: std::ops::Add<Self::A>;
}
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.