What's the difference between
// src/lib.rs
mod a {
pub use self::b::Foo;
mod b {
pub trait Foo {
fn foo(&self);
}
}
}
and
// src/lib.rs
mod a {
pub mod b {
pub trait Foo {
fn foo(&self);
}
}
}
Is it simply a difference of being able to qualify as either a::Foo
and a::b::Foo
in lib.rs? In all cases, must trait Foo be pub (pub trait Foo
)?