pub struct Extension { /* private fields */ }Expand description
Contains all the information about your extension This is used by the generated code to interface with Arma
Implementations
sourceimpl Extension
impl Extension
sourcepub fn build() -> ExtensionBuilder
pub fn build() -> ExtensionBuilder
Creates a new extension.
sourcepub const fn allow_no_args(&self) -> bool
pub const fn allow_no_args(&self) -> bool
Returns if the extension can be called without any arguments. Example:
"my_ext" callExtension "my_func"sourcepub fn register_callback(&mut self, callback: Callback)
pub fn register_callback(&mut self, callback: Callback)
Called by generated code, do not call directly.
sourcepub unsafe fn handle(
&self,
function: *mut c_char,
output: *mut c_char,
size: size_t,
args: Option<*mut *mut i8>,
count: Option<c_int>
) -> c_int
pub unsafe fn handle(
&self,
function: *mut c_char,
output: *mut c_char,
size: size_t,
args: Option<*mut *mut i8>,
count: Option<c_int>
) -> c_int
Called by generated code, do not call directly.
Safety
This function is unsafe because it interacts with the C API.
sourcepub fn run_callbacks(&self)
pub fn run_callbacks(&self)
Called by generated code, do not call directly.
Auto Trait Implementations
impl !RefUnwindSafe for Extension
impl !Send for Extension
impl !Sync for Extension
impl Unpin for Extension
impl !UnwindSafe for Extension
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more