Function illicit::hide [−][src]
pub fn hide<E: 'static>()
Expand description
Removes the provided type from the current environment for the remainder of its scope. Parent environments may still possess a reference to the value.
Example
let msg = "hello!";
illicit::Layer::new().offer(String::from(msg)).enter(|| {
assert_eq!(&*illicit::expect::<String>(), msg);
illicit::hide::<String>();
assert!(illicit::get::<String>().is_err());
});