pub struct Foreign {
pub ptr: *mut c_void,
pub drop_fn: Option<unsafe extern "C" fn(*mut c_void)>,
pub type_id: u64,
pub byte_size: u64,
}Expand description
外部(C/C++)构造的 payload:引擎只持指针,引用归零时回调 drop_fn。
Fields§
§ptr: *mut c_void§drop_fn: Option<unsafe extern "C" fn(*mut c_void)>§type_id: u64§byte_size: u64Trait Implementations§
impl Send for Foreign
impl Sync for Foreign
Auto Trait Implementations§
impl Freeze for Foreign
impl RefUnwindSafe for Foreign
impl Unpin for Foreign
impl UnsafeUnpin for Foreign
impl UnwindSafe for Foreign
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