Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOT READY: small mod_interface fixes #1412

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions module/core/mod_interface/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,30 +72,35 @@ pub mod inner
/// Routine of inner module.
pub fn inner_is() -> bool { true }
}


pub use own::*;

/// Own namespace of the module.
pub mod own
{
use super::*;
pub use orphan::*;
}
pub use own::*;

/// Orphan namespace of the module.
pub mod orphan
{
use super::*;
pub use exposed::*;
}

/// Exposed namespace of the module.
pub mod exposed
{
use super::*;
pub use prelude::*;
}

/// Prelude to use essentials: `use my_module::prelude::*`.
pub mod prelude
{
pub use private::inner_is;
use super::*;
pub use super::private::inner_is;
}
}

Expand All @@ -105,7 +110,7 @@ pub mod own
{
use super::*;
pub use orphan::*;
pub use super::inner::orphan::*;
pub use inner::orphan::*;
}
pub use own::*;

Expand All @@ -123,15 +128,15 @@ pub mod exposed
{
use super::*;
pub use prelude::*;
pub use super::inner::exposed::*;
pub use inner::exposed::*;
}

/// Prelude to use essentials: `use my_module::prelude::*`.
#[ allow( unused_imports ) ]
pub mod prelude
{
use super::*;
pub use super::inner::prelude::*;
pub use inner::prelude::*;
}
```

Expand All @@ -155,15 +160,6 @@ Full sample see at [sample directory](https://github.com/Wandalen/wTools/tree/ma
```sh
cargo add mod_interface
```

### Try out from the repository

```sh
git clone https://github.com/Wandalen/wTools
cd wTools
cd examples/mod_interface_trivial
cargo run
```
### Try out from the repository

```sh
Expand Down
2 changes: 1 addition & 1 deletion module/core/mod_interface_meta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ mod_interface!

}

private < protected < orphan < exposed < prelude
private < own < orphan < exposed < prelude
itself itself its parent its inter-module its inter-module
private public public public public

Expand Down
Loading