napi-rs/napi/src/cleanup_env.rs
2020-10-04 16:02:04 +08:00

8 lines
250 B
Rust

pub(crate) struct CleanupEnvHookData<T: 'static> {
pub(crate) data: T,
pub(crate) hook: Box<dyn FnOnce(T) -> ()>,
}
#[repr(transparent)]
#[derive(Debug, Clone, Copy)]
pub struct CleanupEnvHook<T: 'static>(pub(crate) *mut CleanupEnvHookData<T>);