entrait
entrait copied to clipboard
Associated types fail to compile
Hey @audunhalland, another associated type issue here!
#[entrait::entrait]
pub trait Client {
type DatabaseImpl;
fn database(&self, name: &str) -> Self::DatabaseImpl;
}
The associated type disappears from the generated trait:
pub trait MongoClient {
fn database(&self, name: &str) -> Self::DatabaseImpl;
}
It also needs to be bound in the entrait::Impl
block as:
type DatabaseImpl = <EntraitT as MongoClient>::DatabaseImpl;