pub enum Topology {
Bin,
Mod,
}Expand description
How the split file sits in the module tree — fixes the sibling path prefix
and where sub-module files go. Re-export visibility is per part in both
topologies: pub use when the part has a public item (preserving the
crate’s public API), else pub(crate) use.
Variants§
Bin
A binary or library crate root (main.rs, lib.rs): siblings reached
via crate::, fn main (if any) kept at the root.
Mod
A nested library module (foo/mod.rs, or a plain foo.rs file module):
sub-modules reached via super:: and re-exported with a single per-module
glob — pub use to preserve a public API, else pub(crate) use. A plain
foo.rs file module resolves mod bar; to foo/bar.rs, so its
sub-modules are written into a foo/ subdir.
Trait Implementations§
impl Copy for Topology
impl Eq for Topology
impl StructuralPartialEq for Topology
Auto Trait Implementations§
impl Freeze for Topology
impl RefUnwindSafe for Topology
impl Send for Topology
impl Sync for Topology
impl Unpin for Topology
impl UnsafeUnpin for Topology
impl UnwindSafe for Topology
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more