pub struct Command {
pub name: &'static str,
pub func: *mut c_void,
pub code: f64,
}Expand description
命令条目,用于 inventory 收集并在运行时统一注册。
这个结构体由 #[cmd] 宏自动生成,通常不需要手动创建。
Fields§
§name: &'static str命令名称
func: *mut c_void命令函数指针
code: f64命令代码/类别
Trait Implementations§
impl Collect for Command
impl Copy for Command
impl Sync for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl !Send for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more