1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
use crate::ffi::sys::api;
use crate::ffi::{CBaseFn, FnId};
use crate::fn_caster::FnCaster;
#[derive(Debug)]
pub struct ShutdownCaster {}
#[derive(Debug)]
pub struct PanicCaster {}
#[derive(Debug)]
pub struct HasFunctionCaster {}
#[derive(Debug)]
pub struct GetFunctionCaster {}
#[derive(Debug)]
pub struct LockCaster {}
#[derive(Debug)]
pub struct TryLockCaster {}
#[derive(Debug)]
pub struct UnlockCaster {}
#[derive(Debug)]
pub struct GetSyncHandlerCaster {}
#[derive(Debug)]
pub struct SetSyncHandlerCaster {}
transmute_caster!(ShutdownCaster, api::ShutdownFn, FnId::SysShutdown);
transmute_caster!(PanicCaster, api::PanicFn, FnId::SysPanic);
transmute_caster!(HasFunctionCaster, api::HasFunctionFn, FnId::SysHasFunction);
transmute_caster!(GetFunctionCaster, api::GetFunctionFn, FnId::SysGetFunction);
transmute_caster!(LockCaster, api::LockFn, FnId::SysLock);
transmute_caster!(TryLockCaster, api::TryLockFn, FnId::SysTryLock);
transmute_caster!(UnlockCaster, api::UnlockFn, FnId::SysUnlock);
transmute_caster!(
GetSyncHandlerCaster,
api::GetSyncHandlerFn,
FnId::SysGetSyncHandler
);
transmute_caster!(
SetSyncHandlerCaster,
api::SetSyncHandlerFn,
FnId::SysSetSyncHandler
);