use
statementCrubit supports use
statement for functions and user-defined types. For the following Rust code:
pub use pub_module::pub_function; pub use pub_module::pub_struct; pub use pub_module::pub_struct2 as pub_struct3;
Crubit will generate the following bindings:
using ::pub_module::pub_function; using ::pub_module::pub_struct; using pub_struct3 = ::pub_module::pub_struct2;
Currently, Crubit doesn't support the following cases:
use
with multiple items or globpub use some_module::{a, b}; // Not supported yet. pub use some_module::*; // Not supported yet.`
use
a modulepub use some_module; // Not supported yet.
use
a non-directly public itemmod private_mod { pub fn func() {} } pub use private_mod::func; // Not supported yet. `func` is not directly public // because `private_mod` is private.