1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#![crate_name = "inner"] /// this is a trait pub trait SomeTrait { /// this is a method for [a trait][SomeTrait] fn foo(); } pub mod bar { use super::SomeTrait; pub struct BarStruct; impl SomeTrait for BarStruct { fn foo() {} } }