[][src]Struct sm_ext::ISourceMod

pub struct 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]

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]

impl SMInterfaceApi for ISourceMod[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<'_, T, U> TryFromPlugin<'_, T> for U where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<'ctx, T, U> TryIntoPlugin<'ctx, U> for T where
    U: TryFromPlugin<'ctx, T>, 
[src]

type Error = <U as TryFromPlugin<'ctx, T>>::Error