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