napi-rs/napi/src/cleanup_env.rs

9 lines
250 B
Rust
Raw Normal View History

2020-10-04 17:02:04 +09:00
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>);