pub struct Extension(/* private fields */);Expand description
Wrapper around crate::Extension used for testing.
Implementations§
Source§impl Extension
impl Extension
Sourcepub fn call_with_context(
&self,
function: &str,
args: Option<Vec<String>>,
caller: Caller,
source: Source,
mission: Mission,
server: Server,
remote_exec_owner: i16,
) -> (String, c_int)
pub fn call_with_context( &self, function: &str, args: Option<Vec<String>>, caller: Caller, source: Source, mission: Mission, server: Server, remote_exec_owner: i16, ) -> (String, c_int)
Call a function with Arma call context.
§Safety
This function is unsafe because it interacts with the C API.
Sourcepub fn callback_handler<F, T, E>(
&self,
handler: F,
timeout: Duration,
) -> Result<T, E>
pub fn callback_handler<F, T, E>( &self, handler: F, timeout: Duration, ) -> Result<T, E>
Create a callback handler
Returns a Result from the handler if the callback was handled,
or Result::Timeout if either no event was received, or the handler
returned Result::Continue until the timeout was reached.
The handler must return a Result indicating the callback was handled to exit
Result::Continue will continue to provide events to the handler until another variant is returned
Auto Trait Implementations§
impl Freeze for Extension
impl !RefUnwindSafe for Extension
impl !Send for Extension
impl !Sync for Extension
impl Unpin for Extension
impl !UnwindSafe for Extension
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