spring_ai_rs/ai_interface/callback/command/command_data/
mod.rs1pub mod cheats;
2pub mod debug_drawer;
3pub mod drawer;
4pub mod group;
5pub mod lua;
6pub mod other;
7pub mod path;
8pub mod send;
9pub mod trace;
10pub mod unit;
11
12use libc::c_void;
13
14pub trait CommandData {
16 type CDataType: CData;
17 fn c_data(&mut self) -> Self::CDataType;
18}
19
20pub trait CData {
21 fn c_void(&mut self) -> *mut c_void {
22 self as *mut _ as *mut c_void
23 }
24}
25
26pub struct EmptyCommandData {}
28
29impl CommandData for EmptyCommandData {
30 type CDataType = EmptyCommandCData;
31
32 fn c_data(&mut self) -> Self::CDataType {
33 EmptyCommandCData {}
34 }
35}
36
37pub struct EmptyCommandCData {}
38
39impl CData for EmptyCommandCData {}