[−][src]Crate galbi
galbi is a library that provides shortcut types for idiomatic nested types.
install
If cargo-edit is installed, you can install it like this:
cargo add galbi
If not, you have to manually add the dependency to Cargo.toml.
[dependencies]
galbi = "0.2.1"
use
It can be used in the following format. Since the automatic dereferencing trait is implemented, you can use the inner methods right away.
use galbi::*; fn main() { let shared = ArcMutex::new(15); let get = shared.lock().unwrap(); println!("{}", *get); }
features
- Rc<RefCell<T>> -> RcCell
- Arc<Mutex<T>> -> ArcMutex
- Option<Box<T>> -> OptionBox
- ... more later
link
Re-exports
pub use option_box::*; |
pub use rc_cell::*; |
pub use arc_mutex::*; |
Modules
arc_mutex | It is Wrapper Type of |
option_box | It is Wrapper Type of |
rc_cell | It is Wrapper Type of |