Expand description
Smart pointers for accessing AMX VM cells from safe Rust code.
A “cell” is the native Pawn VM type: a 32-bit integer (i32) that can
represent int, float (via bit reinterpretation) or a pointer relative
to the AMX heap/data. The types in this module wrap those cells with
Rust semantics:
Ref<T>: typed pointer to a cell (by-reference output of natives).Buffer/UnsizedBuffer: array of contiguous cells.AmxString: native Pawn string (cell vector with0terminator).AmxCell,AmxPrimitive,CellConvert: conversion traits.
Modules§
- buffer
- AMX cell vectors (Pawn arrays) —
Buffer(sized) andUnsizedBuffer(unsized, received as a native argument). - repr
- Conversion between Rust types and AMX cells (raw i32).
- string
- AMX strings: cell vector with
0terminator.
Structs§
- AmxString
- Native Pawn string — packed or unpacked.
- Buffer
- AMX cell array with a known size.
- Ref
- Typed pointer to a live cell in the AMX heap/data.
- Unsized
Buffer - Array with unknown size — received as a native argument when the
Pawn signature is
array[]without a fixed dimension.
Traits§
- AmxCell
- Conversion to/from an AMX cell in the context of a live VM.
- AmxPrimitive
- Marker: the value fits in a single AMX cell (32 bits) and can be stored directly in the VM stack/heap without indirection.
- Cell
Convert - Conversion between Rust and an AMX cell (
i32) without needing&Amx.