pub struct Function {
pub name: String,
pub namespace: Vec<String>,
pub rva: u32,
pub calling_convention: CallingConvention,
pub return_type: TypeId,
pub parameters: Vec<Parameter>,
pub variadic: bool,
pub custom_storage: bool,
pub tags: Vec<String>,
pub verification: Vec<u8>,
pub shape: String,
pub pattern: Option<Pattern>,
}Expand description
A function in a module.
Fields§
§name: StringThe function’s name, without namespace. Overloads may share a name.
namespace: Vec<String>The namespace path, outermost first (e.g. ["Engine", "Entity"]). Empty
for a free function.
rva: u32The function’s address, relative to the module’s image base.
calling_convention: CallingConventionThe calling convention.
return_type: TypeIdThe return type (the void primitive for no return value).
parameters: Vec<Parameter>The parameters, in order.
variadic: boolWhether the function is variadic.
custom_storage: boolWhether the parameters use non-standard storage, given by their
Storage, instead of the calling convention’s defaults.
Free-form tags attached to the function (e.g. in Ghidra).
verification: Vec<u8>The bytes expected at the start of the function, used to verify the build before hooking. Empty if none were recorded.
shape: StringThe same bytes as verification, with the ones that hold addresses as
??, e.g. "48 8d 05 ?? ?? ?? ?? c3". Checks the function is still the
same code where its addresses may have changed. Empty if none were
recorded.
pattern: Option<Pattern>A byte pattern that finds the function when the bytes at rva don’t
match verification, as after an update to the module.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Function
impl<'de> Deserialize<'de> for Function
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Function
impl JsonSchema for Function
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more