pub struct Context { /* private fields */ }Expand description
Contains information about the current execution context
Implementations§
source§impl Context
impl Context
sourcepub const fn global(&self) -> &GlobalContext
pub const fn global(&self) -> &GlobalContext
Global context
sourcepub const fn group(&self) -> &GroupContext
pub const fn group(&self) -> &GroupContext
Group context, is equal to GlobalContext if the call is from the global scope.
sourcepub const fn caller(&self) -> &Caller
pub const fn caller(&self) -> &Caller
Player that called the extension. Can be Caller::Unknown when the player’s steamID64 is unavailable
Note
Unlike https://community.bistudio.com/wiki/getPlayerUID Caller::Steam isn’t limited to multiplayer.
sourcepub const fn buffer_len(&self) -> usize
pub const fn buffer_len(&self) -> usize
Returns the length in bytes of the output buffer. This is the maximum size of the data that can be returned by the extension.
sourcepub fn callback_data<V>(
&self,
name: &str,
func: &str,
data: V
) -> Result<(), CallbackError>where
V: IntoArma,
pub fn callback_data<V>( &self, name: &str, func: &str, data: V ) -> Result<(), CallbackError>where V: IntoArma,
Sends a callback with data into Arma https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#ExtensionCallback
sourcepub fn callback_null(&self, name: &str, func: &str) -> Result<(), CallbackError>
pub fn callback_null(&self, name: &str, func: &str) -> Result<(), CallbackError>
Sends a callback without data into Arma https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#ExtensionCallback
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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