2020-10-04 17:02:04 +09:00
|
|
|
pub(crate) struct CleanupEnvHookData<T: 'static> {
|
|
|
|
pub(crate) data: T,
|
2020-12-01 15:55:19 +09:00
|
|
|
pub(crate) hook: Box<dyn FnOnce(T)>,
|
2020-10-04 17:02:04 +09:00
|
|
|
}
|
|
|
|
|
2020-12-03 18:17:40 +09:00
|
|
|
/// Created by `Env::add_env_cleanup_hook`
|
|
|
|
/// And used by `Env::remove_env_cleanup_hook`
|
2020-11-25 18:42:14 +09:00
|
|
|
#[derive(Clone, Copy)]
|
2020-10-04 17:02:04 +09:00
|
|
|
pub struct CleanupEnvHook<T: 'static>(pub(crate) *mut CleanupEnvHookData<T>);
|