mod one {
pub struct Ctx {
username:String,
password: String
}
}
mod two {
pub trail Get;
impl Get for Ctx {
fn get (&self) -> Ctx {
Ctx {
username: self.username,
password : self.password
}
}
}
}
mod three {
println!(Ctx.get());
}
Every mod is in the different mod file. Once I add new trait it should reflect to mod there.
I think it is not possible but still asking. Is there any way?