[−][src]Struct sm_ext::ISourceMod
Methods
impl ISourceMod
[src]
pub fn log_message(&self, myself: &IExtension, msg: String)
[src]
pub fn log_error(&self, myself: &IExtension, msg: String)
[src]
pub fn add_game_frame_hook(&self, hook: GameFrameHookFunc) -> GameFrameHookId
[src]
Add a function that will be called every game frame until the GameFrameHookId
return value
is dropped. This is a fairly low-level building block as the callback must be extern "C"
.
pub fn add_frame_action<F>(&self, func: F) where
F: FnMut() + 'static,
[src]
F: FnMut() + 'static,
Add a function that will be called on the next game frame. This has a runtime cost as this API
is thread-safe on the SM side, but it supports a Rust closure so is more flexible than ISourceMod::add_game_frame_hook
.
Trait Implementations
impl Debug for ISourceMod
[src]
impl RequestableInterface for ISourceMod
[src]
fn get_interface_name() -> &'static str
[src]
fn get_interface_version() -> u32
[src]
unsafe fn from_raw_interface(iface: SMInterface) -> ISourceMod
[src]
impl SMInterfaceApi for ISourceMod
[src]
fn get_interface_version(&self) -> u32
[src]
fn get_interface_name(&self) -> &str
[src]
fn is_version_compatible(&self, version: u32) -> bool
[src]
Auto Trait Implementations
impl RefUnwindSafe for ISourceMod
impl !Send for ISourceMod
impl !Sync for ISourceMod
impl Unpin for ISourceMod
impl UnwindSafe for ISourceMod
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<'_, T, U> TryFromPlugin<'_, T> for U where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_from_plugin(
&IPluginContext,
T
) -> Result<U, <U as TryFromPlugin<'_, T>>::Error>
[src]
&IPluginContext,
T
) -> Result<U, <U as TryFromPlugin<'_, T>>::Error>
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<'ctx, T, U> TryIntoPlugin<'ctx, U> for T where
U: TryFromPlugin<'ctx, T>,
[src]
U: TryFromPlugin<'ctx, T>,
type Error = <U as TryFromPlugin<'ctx, T>>::Error
fn try_into_plugin(
Self,
&'ctx IPluginContext
) -> Result<U, <U as TryFromPlugin<'ctx, T>>::Error>
[src]
Self,
&'ctx IPluginContext
) -> Result<U, <U as TryFromPlugin<'ctx, T>>::Error>