[][src]Crate sm_ext

This interface is extremely unstable, everything just lives in a soup at the top level for now.

Macros

c_str

Produce a CStr reference out of a static string literal.

register_natives
virtual_call

Helper for virtual function invocation that works with the #[vtable] attribute to support virtual calls on Windows without compiler support for the thiscall calling convention.

virtual_call_varargs

Helper for varargs-using virtual function invocation that works with the #[vtable] attribute to support virtual calls on Windows without compiler support for the thiscall calling convention.

Structs

DummyNativeError

Dummy error used for NativeResult implementations that can never fail.

GameFrameHookId
HandleId
HandleSecurity

This pair of tokens is used for identification.

HandleType
HandleTypeId
IChangeableForward
IExtension
IExtensionInterfaceAdapter
IForward
IForwardManager
IHandleSys
IHandleTypeDispatchAdapter
IPluginContext
IPluginFunction
IShareSys
ISourceMod
IdentityToken
IdentityType
NativeInfo

Struct to contain name/fnptr pairs for native registration.

SMInterface
cell_t

Wrapper type that represents a value from SourcePawn.

Enums

CreateForwardError
ExecType

Defines how a forward iterates through plugin functions.

FeatureStatus
FeatureType
GetFunctionError
HandleError

Lists the possible handle error codes.

IsRunningError
ParamType

Describes the various ways to pass parameters to plugins.

PathType

Describes various ways of formatting a base path.

RequestInterfaceError
SPError

Error codes for SourcePawn routines.

Traits

CallableParam
ExecutableApi
ICallableApi
IExtensionInterface
IExtensionMetadata
NativeResult

The return type for native callbacks.

RequestableInterface
SMInterfaceApi
TryFromPlugin

Trait to support conversions to/from cell_t that require an IPluginContext for access to plugin memory.

TryIntoPlugin

Trait to support conversions to/from cell_t that require an IPluginContext for access to plugin memory.

Functions

safe_native_invoke

Wrapper to invoke a native callback and translate a panic! or Err return into a SourceMod error using IPluginContext::throw_native_error.

Type Definitions

GameFrameHookFunc
IChangeableForwardPtr
IExtensionInterfacePtr
IExtensionPtr
IFeatureProviderPtr
IForwardManagerPtr
IForwardPtr
IHandleSysPtr
IHandleTypeDispatchPtr
IPluginContextPtr
IPluginFunctionPtr
IPluginRuntimePtr
IShareSysPtr
ISourceModPtr
IdentityTokenPtr
SMInterfacePtr
size_t

Attribute Macros

forwards
native

Declares a function as a native callback and generates internal support code.

vtable
vtable_override

Derive Macros

ICallableApi
SMExtension

Creates the entry point for SourceMod to recognise this library as an extension and set the required metadata.

SMInterfaceApi