### resources Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Gets the Resources. ```APIDOC ## resources ### Description Gets the Resources. ### Method N/A (Rust method) ### Parameters None ### Returns - **Result, Error>** - The Resources or an error. ``` -------------------------------- ### imports Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Gets the Import Directory. ```APIDOC ## imports ### Description Gets the Import Directory. ### Method N/A (Rust method) ### Parameters None ### Returns - **Result, Error>** - The Import Directory or an error. ``` -------------------------------- ### tls Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Gets the TLS Directory. ```APIDOC ## tls ### Description Gets the TLS Directory. ### Method N/A (Rust method) ### Parameters None ### Returns - **Result, Error>** - The TLS Directory or an error. ``` -------------------------------- ### iat Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Gets the Import Address Table. ```APIDOC ## iat ### Description Gets the Import Address Table. ### Method N/A (Rust method) ### Parameters None ### Returns - **Result, Error>** - The Import Address Table or an error. ``` -------------------------------- ### exports Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Gets the Export Directory. ```APIDOC ## exports ### Description Gets the Export Directory. ### Method N/A (Rust method) ### Parameters None ### Returns - **Result, Error>** - The Export Directory or an error. ``` -------------------------------- ### load_config Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Gets the Load Config Directory. ```APIDOC ## load_config ### Description Gets the Load Config Directory. ### Method N/A (Rust method) ### Parameters None ### Returns - **Result, Error>** - The Load Config Directory or an error. ``` -------------------------------- ### security Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Gets the Security Directory. ```APIDOC ## security ### Description Gets the Security Directory. ### Method N/A (Rust method) ### Parameters None ### Returns - **Result, Error>** - The Security Directory or an error. ``` -------------------------------- ### Usage example with children attribute Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/derive.Superclass.html?search= Example of using the Superclass derive macro with a #[superclass(children(...))] attribute to generate subclass enums. The struct must be #[repr(C)] and have a _vftable field. ```rust #[repr(C)] #[derive(Superclass)] #[superclass(children(Cow, Pig))] pub struct Animal { _vftable: usize, } ``` -------------------------------- ### exception Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Gets the Exception Directory. ```APIDOC ## exception ### Description Gets the Exception Directory. ### Method N/A (Rust method) ### Parameters None ### Returns - **Result, Error>** - The Exception Directory or an error. ``` -------------------------------- ### Derive macro syntax for Superclass Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/derive.Superclass.html?search= Shows the basic syntax for using the Superclass derive macro. The macro is applied to a struct and can accept a #[superclass] attribute. This is the minimal usage example. ```rust #[derive(Superclass)] { // Attributes available to this derive: #[superclass] } ``` -------------------------------- ### debug Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Gets the Debug Directory. ```APIDOC ## debug ### Description Gets the Debug Directory. ### Method N/A (Rust method) ### Parameters None ### Returns - **Result, Error>** - The Debug Directory or an error. ``` -------------------------------- ### NonEmptyIterMut::step_by Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/empty/struct.NonEmptyIterMut.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates an iterator starting at the same point, but stepping by the given amount at each iteration. ```APIDOC ## NonEmptyIterMut::step_by ### Description Creates an iterator starting at the same point, but stepping by the given amount at each iteration. ### Method step_by ### Signature fn step_by(self, step: usize) -> StepBy ### Parameters - `step` (usize) - Required - The step size. ### Returns - `StepBy` - An iterator that steps by the given amount. ``` -------------------------------- ### CCallbackBaseVmt::run Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/steam/trait.CCallbackBaseVmt.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Called when the callback is triggered. ```APIDOC ## CCallbackBaseVmt::run ### Description Called when the callback is triggered. ### Method `extern "C" fn run(&mut self, pv_param: *mut P)` ### Parameters - `pv_param` (*mut P) - Required - Pointer to the parameter struct. ### Returns `()` ``` -------------------------------- ### Default::default Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/owned_pointer/struct.OwnedPtr.html?search=u32+-%3E+bool Creates a default OwnedPtr instance when T implements Default. ```APIDOC ## Default::default ### Description Returns the default value for the type. ### Method `fn default() -> Self` ### Returns - `Self` - The default `OwnedPtr` instance. ``` -------------------------------- ### new Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/empty/struct.MaybeEmpty.html?search=u32+-%3E+bool Creates a new MaybeEmpty instance initialized with the given value. ```APIDOC ## new ### Description Creates a new `MaybeEmpty` initialized with the given value. ### Method `pub fn new(value: T) -> MaybeEmpty` ### Parameters - **value** (T) - Required - The value to initialize the `MaybeEmpty` with. ### Returns - **MaybeEmpty** - A new `MaybeEmpty` instance containing the given value. ``` -------------------------------- ### scanner Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Gets Scanner access. ```APIDOC ## scanner ### Description Gets Scanner access. ### Method N/A (Rust method) ### Parameters None ### Returns - **Scanner** - The Scanner instance. ``` -------------------------------- ### take Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/empty/struct.NonEmptyIter.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates an iterator that yields the first n elements, or fewer if the underlying iterator ends sooner. ```APIDOC ## take ### Description Creates an iterator that yields the first n elements, or fewer if the underlying iterator ends sooner. ### Signature fn take(self, n: usize) -> Take where Self: Sized ### Parameters - **n** (usize) - Required - The number of elements to yield. ### Returns Take - An iterator adapter that yields at most n elements. ``` -------------------------------- ### new Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/dl_math/struct.F32PackedModelMatrix.html?search=u32+-%3E+bool Pack from an array of row vectors. ```APIDOC ## new ### Description Pack from an array of row vectors. ### Method new ### Signature pub fn new(r0: F32Vector4, r1: F32Vector4, r2: F32Vector4, r3: F32Vector4) -> Self ### Parameters - **r0** (F32Vector4) - Required - First row vector. - **r1** (F32Vector4) - Required - Second row vector. - **r2** (F32Vector4) - Required - Third row vector. - **r3** (F32Vector4) - Required - Fourth row vector. ### Returns - **Self** - The packed model matrix. ``` -------------------------------- ### Program::current Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Returns the currently running program. ```APIDOC ## [Rust] Program::current ### Description Returns the currently running program. ### Method Rust associated function ### Signature `pub fn current() -> Self` ### Returns - `Self` - The currently running program. ``` -------------------------------- ### load_static_direct Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/fn.load_static_direct.html?search=u32+-%3E+bool Documentation for the load_static_direct function, which loads a static reference from an Rva. ```APIDOC ## load_static_direct ### Description Loads a static reference to `T` from an Rva that points directly to its memory. Because this always assumes that the underlying object is initialized, it can only return InstanceError::Null if `rva` itself is 0. ### Signature ```rust pub fn load_static_direct(rva: Rva) -> InstanceResult<*mut T> ``` ### Parameters - **rva** (Rva) - Required - The relative virtual address that points directly to the memory of the static object. ### Type Parameters - **T** (FromStatic) - Required - The type of the static object to load. ### Returns - **InstanceResult<*mut T>** - A result containing a mutable pointer to the loaded static object, or an InstanceError::Null if `rva` is 0. ``` -------------------------------- ### load_static_indirect Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/fn.load_static_indirect.html?search=std%3A%3Avec Documentation for the `load_static_indirect` function in the `fromsoftware_shared` crate. ```APIDOC ## load_static_indirect ### Description Loads a static reference to `T` from an Rva that points to a pointer to its memory. ### Signature ```rust pub unsafe fn load_static_indirect( rva: Rva, ) -> InstanceResult<*mut T> ``` ### Parameters - **rva** (Rva) - Required - The relative virtual address that points to a pointer to the memory of `T`. ### Returns - **InstanceResult<*mut T>** - The result containing a mutable pointer to `T`. ### Safety - The caller must ensure that `rva` points to a pointer. ``` -------------------------------- ### pub fn new(subclass: String) -> Self Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/struct.TryFromSuperclassError.html Creates a new TryFromSuperclassError for the given subclass name. ```APIDOC ## pub fn new(subclass: String) -> Self ### Description Returns a TryFromSuperclassError for the given subclass name. ### Method new ### Parameters - **subclass** (String) - Required - The name of the subclass that caused the error. ### Returns - **Self** - A new TryFromSuperclassError instance. ### Example ```rust let error = TryFromSuperclassError::new("MySubclass".to_string()); ``` ``` -------------------------------- ### base_relocs Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Gets the Base Relocations Directory. ```APIDOC ## base_relocs ### Description Gets the Base Relocations Directory. ### Method N/A (Rust method) ### Parameters None ### Returns - **Result, Error>** - The Base Relocations Directory or an error. ``` -------------------------------- ### Struct F32Matrix2x3 Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/dl_math/struct.F32Matrix2x3.html?search=u32+-%3E+bool Documentation for the F32Matrix2x3 struct, including its definition, tuple fields, constructor method, and trait implementations. ```APIDOC ## Struct F32Matrix2x3 ### Description Row-major 2x3 float matrix. ### Definition ```rust #[repr(C)] pub struct F32Matrix2x3(pub F32Vector3, pub F32Vector3); ``` ### Tuple Fields - `0: F32Vector3` - `1: F32Vector3` ### Implementations #### `pub fn new(c0: F32Vector3, c1: F32Vector3) -> Self` Construct from an array of row/column vectors. ### Trait Implementations - `Clone` - `Copy` - `Debug` - `PartialEq` - `StructuralPartialEq` ### Auto Trait Implementations - `Freeze` - `RefUnwindSafe` - `Send` - `Sync` - `Unpin` - `UnsafeUnpin` - `UnwindSafe` ### Blanket Implementations - `Any` - `Borrow` - `BorrowMut` - `CloneToUninit` - `From` - `Into` - `ToOwned` - `TryFrom` - `TryInto` ``` -------------------------------- ### From for F32Matrix3x3 Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/dl_math/struct.F32Matrix3x3.html?search= Converts a glam Mat3 into a F32Matrix3x3. ```APIDOC ## [Rust] From for F32Matrix3x3 ### Description Converts a glam Mat3 into a F32Matrix3x3. ### Method fn from(m: Mat3) -> Self ### Parameters - **m** (Mat3) - Required - The matrix to convert. ### Returns - **Self** - The resulting F32Matrix3x3. ### Example ```rust let matrix: F32Matrix3x3 = mat3.into(); ``` ``` -------------------------------- ### UnknownPtr::addr Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/struct.UnknownPtr.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Gets the address portion of the pointer. ```APIDOC ## UnknownPtr::addr ### Description Gets the “address” portion of the pointer. ### Method `pub fn addr(self) -> usize` ### Parameters - `self` - The `UnknownPtr` instance. ### Returns - `usize` - The address as a `usize`. ``` -------------------------------- ### partition Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/empty/struct.NonEmptyIter.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Consumes an iterator, creating two collections from it. ```APIDOC ## partition ### Description Consumes an iterator, creating two collections from it. ### Signature fn partition(self, f: F) -> (B, B) where Self: Sized, B: Default + Extend, F: FnMut(&Self::Item) -> bool ### Parameters - **f** (F) - Required - A closure that determines which collection each item goes into. ### Returns (B, B) - A tuple of two collections: one for items where f returns true, and one for items where f returns false. ``` -------------------------------- ### MaybeEmpty::as_non_null Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/empty/struct.MaybeEmpty.html Gets a pointer to the contained value, which may be in the empty state. ```APIDOC ## [RUST] MaybeEmpty::as_non_null ### Description Returns a NonNull pointer to the contained value. The pointer is always valid for reading, but the value may be in the empty pattern. ### Method as_non_null ### Signature pub fn as_non_null(&self) -> NonNull ### Parameters None ### Returns - **NonNull** - A non-null pointer to the contained value. ### Safety Reading from the returned pointer is safe as long as the value is either a valid T or matches the well-known empty pattern. ### Example ```rust let ptr = maybe.as_non_null(); ``` ``` -------------------------------- ### F32ViewMatrix::new Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/dl_math/type.F32ViewMatrix.html?search=std%3A%3Avec Constructs a new F32ViewMatrix from four row vectors. ```APIDOC ## [FUNCTION] F32ViewMatrix::new ### Description Constructs a new F32ViewMatrix from four row vectors. ### Method FUNCTION ### Signature ```rust pub fn new(r0: F32Vector4, r1: F32Vector4, r2: F32Vector4, r3: F32Vector4) -> Self ``` ### Parameters - **r0** (F32Vector4) - Required - First row vector. - **r1** (F32Vector4) - Required - Second row vector. - **r2** (F32Vector4) - Required - Third row vector. - **r3** (F32Vector4) - Required - Fourth row vector. ### Returns - **Self** - A new F32ViewMatrix instance. ``` -------------------------------- ### as_non_null Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/empty/struct.MaybeEmpty.html?search=u32+-%3E+bool Gets a pointer to the contained value, which is safe to read as the memory is either a valid T or matches the empty pattern. ```APIDOC ## as_non_null ### Description Gets a pointer to the contained value. Reading from this pointer is unsafe but well-defined, since the underlying memory will either be a valid `T` _or_ match the well-known empty pattern. ### Method `pub fn as_non_null(&self) -> NonNull` ### Parameters - **self** (&self) - Required - The `MaybeEmpty` instance. ### Returns - **NonNull** - A non-null pointer to the contained value. ``` -------------------------------- ### CCallbackBaseVmtLayout Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/steam/struct.CCallbackBaseVmtLayout.html?search=std%3A%3Avec Struct definition with four function pointer fields representing the vtable layout. ```APIDOC ## Struct CCallbackBaseVmtLayout ### Description Represents the virtual method table layout for `CCallbackBaseVmt`. Contains function pointers for run, run_call, get_callback_size_bytes, and destructor. ### Fields - **run** (`extern "C" fn(this: &mut __VtableT, pv_param: *mut P)`) - Function pointer for the run callback. - **run_call** (`extern "C" fn(this: &mut __VtableT, pv_param: *mut P, io_failure: bool, api_call: u64)`) - Function pointer for the run_call callback. - **get_callback_size_bytes** (`extern "C" fn(this: &mut __VtableT) -> i32`) - Function pointer to get the callback size in bytes. - **destructor** (`extern "C" fn(this: &mut __VtableT, should_free: bool)`) - Function pointer for the destructor. ### Type Parameters - `__VtableT: 'static` - The vtable type. - `P: 'static` - The parameter type. ### Trait Implementations - `Clone` - Provides `clone` and `clone_from` methods. - `Copy` - Implements copy semantics. ### Auto Traits - `Freeze` - `RefUnwindSafe` - `Send` - `Sync` - `Unpin` - `UnsafeUnpin` - `UnwindSafe` ``` -------------------------------- ### CCallbackBaseVmtLayout struct definition Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/steam/struct.CCallbackBaseVmtLayout.html Defines the CCallbackBaseVmtLayout struct with four function pointer fields: run, run_call, get_callback_size_bytes, and destructor. Each field is an extern "C" function pointer with specific signatures. ```rust #[repr(C)] pub struct CCallbackBaseVmtLayout<__VtableT: 'static, P: 'static> { pub run: extern "C" fn(this: &mut __VtableT, pv_param: *mut P), pub run_call: extern "C" fn(this: &mut __VtableT, pv_param: *mut P, io_failure: bool, api_call: u64), pub get_callback_size_bytes: extern "C" fn(this: &mut __VtableT) -> i32, pub destructor: extern "C" fn(this: &mut __VtableT, should_free: bool), } ``` -------------------------------- ### Derive Superclass with children attribute Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/derive.Superclass.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Example of deriving `Superclass` with the `#[superclass(children(...))]` attribute to generate subclass enums for the given child types. ```rust #[repr(C)] #[derive(Superclass)] #[superclass(children(Cow, Pig))] pub struct Animal { _vftable: usize, } ``` -------------------------------- ### as_non_null Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/empty/struct.MaybeEmpty.html?search=std%3A%3Avec Gets a pointer to the contained value. Reading from this pointer is unsafe but well-defined, since the underlying memory will either be a valid T or match the well-known empty pattern. ```APIDOC ## as_non_null ### Description Gets a pointer to the contained value. Reading from this pointer is unsafe but well-defined, since the underlying memory will either be a valid T or match the well-known empty pattern. ### Method as_non_null ### Parameters - **&self** - Required - The MaybeEmpty instance. ### Returns - **NonNull** - A non-null pointer to the contained value. ### Example ```rust let ptr = maybe.as_non_null(); // unsafe { *ptr.as_ptr() } // unsafe to read ``` ``` -------------------------------- ### F32Matrix4x3 Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/dl_math/struct.F32Matrix4x3.html Documentation for the F32Matrix4x3 struct, including its definition, constructor, and trait implementations. ```APIDOC ## Struct F32Matrix4x3 ### Description Represents a column-major 4x3 float matrix. ### Definition ```rust #[repr(C, align(16))] pub struct F32Matrix4x3(pub F32Vector4, pub F32Vector4, pub F32Vector4); ``` ### Tuple Fields - `0: F32Vector4` - First column vector. - `1: F32Vector4` - Second column vector. - `2: F32Vector4` - Third column vector. ### Implementations #### `new` ```rust pub fn new(c0: F32Vector4, c1: F32Vector4, c2: F32Vector4) -> Self ``` Constructs a new `F32Matrix4x3` from three column vectors. ### Trait Implementations - `Clone` - Provides `clone` and `clone_from` methods. - `Copy` - Implements copy semantics. - `Debug` - Provides formatting via `fmt`. - `PartialEq` - Provides equality and inequality operators. - `StructuralPartialEq` - Marker trait for structural equality. ### Auto Trait Implementations - `Freeze` - `RefUnwindSafe` - `Send` - `Sync` - `Unpin` - `UnsafeUnpin` - `UnwindSafe` ### Blanket Implementations - `Any` - Provides `type_id`. - `Borrow` - Provides `borrow`. - `BorrowMut` - Provides `borrow_mut`. - `CloneToUninit` - Provides `clone_to_uninit` (nightly-only). - `From` - Provides `from`. - `Into` - Provides `into`. - `ToOwned` - Provides `to_owned` and `clone_into`. - `TryFrom` - Provides `try_from`. - `TryInto` - Provides `try_into`. ``` -------------------------------- ### multi_param with fields! macro Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/attr.multi_param.html?search=std%3A%3Avec Example of using the multi_param attribute macro with a trait that contains a fields! macro. The macro generates getters and setters for each field in the implementation for each struct listed. ```rust #[multi_param(EQUIP_PARAM_ACCESSORY_ST, EQUIP_PARAM_GOODS_ST)] pub trait EquipParamPassive: EquipParam { fields! { sfx_variation_id: i32, ref_category: u8, sp_effect_category: u8, shop_lv: i16, } } ``` -------------------------------- ### Generated enums from multi_param Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/attr.multi_param.html?search=u32+-%3E+bool The `multi_param` macro generates two enums, one immutable and one mutable, with variants for each parameter type. The example shows the generated `EquipParamStruct` and `EquipParamStructMut` enums with an `as_dyn` method. ```rust pub enum EquipParamStruct<'a> { EQUIP_PARAM_ACCESSORY_ST(&'a EQUIP_PARAM_ACCESSORY_ST), EQUIP_PARAM_GOODS_ST(&'a EQUIP_PARAM_GOODS_ST), EQUIP_PARAM_PROTECTOR_ST(&'a EQUIP_PARAM_PROTECTOR_ST), EQUIP_PARAM_WEAPON_ST(&'a EQUIP_PARAM_WEAPON_ST), } impl EquipParamStruct<'_> { pub fn as_dyn(&self) -> &dyn EquipParam; } pub enum EquipParamStructMut<'a> { EQUIP_PARAM_ACCESSORY_ST(&'a mut EQUIP_PARAM_ACCESSORY_ST), EQUIP_PARAM_GOODS_ST(&'a mut EQUIP_PARAM_GOODS_ST), EQUIP_PARAM_PROTECTOR_ST(&'a mut EQUIP_PARAM_PROTECTOR_ST), EQUIP_PARAM_WEAPON_ST(&'a mut EQUIP_PARAM_WEAPON_ST), } impl EquipParamStructMut<'_> { pub fn as_dyn(&mut self) -> &mut dyn EquipParam; } ``` -------------------------------- ### Program Methods Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search=std%3A%3Avec Methods for the Program type that provide access to PE file structures and utilities. ```APIDOC ## deref_c_str ### Description Dereferences the pointer to a nul-terminated C string. ### Method Function ### Signature `fn deref_c_str(self, ptr: Ptr) -> Result<&'a CStr, Error>` ### Parameters - **ptr** (Ptr) - Required - Pointer to a nul-terminated C string. ### Returns - **Result<&'a CStr, Error>** - The dereferenced C string or an error. ``` ```APIDOC ## deref_string ### Description Dereferences the pointer to a string. ### Method Function ### Signature `fn deref_string(self, ptr: Ptr) -> Result<&'a T, Error> where T: FromBytes + ?Sized` ### Parameters - **ptr** (Ptr) - Required - Pointer to a string. ### Returns - **Result<&'a T, Error>** - The dereferenced string or an error. ``` ```APIDOC ## rich_structure ### Description Returns the Rich structure. ### Method Function ### Signature `fn rich_structure(self) -> Result, Error>` ### Returns - **Result, Error>** - The Rich structure or an error. ``` ```APIDOC ## exports ### Description Gets the Export Directory. ### Method Function ### Signature `fn exports(self) -> Result, Error>` ### Returns - **Result, Error>** - The Export Directory or an error. ``` ```APIDOC ## imports ### Description Gets the Import Directory. ### Method Function ### Signature `fn imports(self) -> Result, Error>` ### Returns - **Result, Error>** - The Import Directory or an error. ``` ```APIDOC ## iat ### Description Gets the Import Address Table. ### Method Function ### Signature `fn iat(self) -> Result, Error>` ### Returns - **Result, Error>** - The Import Address Table or an error. ``` ```APIDOC ## base_relocs ### Description Gets the Base Relocations Directory. ### Method Function ### Signature `fn base_relocs(self) -> Result, Error>` ### Returns - **Result, Error>** - The Base Relocations Directory or an error. ``` ```APIDOC ## load_config ### Description Gets the Load Config Directory. ### Method Function ### Signature `fn load_config(self) -> Result, Error>` ### Returns - **Result, Error>** - The Load Config Directory or an error. ``` ```APIDOC ## tls ### Description Gets the TLS Directory. ### Method Function ### Signature `fn tls(self) -> Result, Error>` ### Returns - **Result, Error>** - The TLS Directory or an error. ``` ```APIDOC ## security ### Description Gets the Security Directory. ### Method Function ### Signature `fn security(self) -> Result, Error>` ### Returns - **Result, Error>** - The Security Directory or an error. ``` ```APIDOC ## exception ### Description Gets the Exception Directory. ### Method Function ### Signature `fn exception(self) -> Result, Error>` ### Returns - **Result, Error>** - The Exception Directory or an error. ``` ```APIDOC ## debug ### Description Gets the Debug Directory. ### Method Function ### Signature `fn debug(self) -> Result, Error>` ### Returns - **Result, Error>** - The Debug Directory or an error. ``` ```APIDOC ## resources ### Description Gets the Resources. ### Method Function ### Signature `fn resources(self) -> Result, Error> where Self: Copy` ### Returns - **Result, Error>** - The Resources or an error. ``` ```APIDOC ## scanner ### Description Gets Scanner access. ### Method Function ### Signature `fn scanner(self) -> Scanner` ### Returns - **Scanner** - Scanner access. ``` ```APIDOC ## image ### Description Returns the image as a byte slice. ### Method Function ### Signature `fn image(&self) -> &'a [u8]` ### Returns - **&'a [u8]** - The image as a byte slice. ``` ```APIDOC ## align ### Description Returns whether this image uses file alignment or section alignment. ### Method Function ### Signature `fn align(&self) -> Align` ### Returns - **Align** - The alignment type. ``` -------------------------------- ### GameVersion::detect Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/game_version/trait.GameVersion.html?search= Detects the game version from a PE module view. ```APIDOC ## GameVersion::detect ### Description Detects the game version from a PE module view. ### Method `fn detect(module: &PeView<'_>) -> Result` ### Parameters - **module** (&PeView<'_>) - Required - A reference to the PE module view. ### Returns - **Result** - Returns `Ok(GameVersion)` if detection succeeds, otherwise `Err(DetectError)`. ``` -------------------------------- ### Trait CCallbackBaseVmt Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/steam/trait.CCallbackBaseVmt.html The CCallbackBaseVmt trait defines the vtable interface for Steam callback objects. It requires implementing methods for running callbacks, handling API call results, getting the callback parameter size, and destruction. ```APIDOC ## Trait CCallbackBaseVmt ### Description The `CCallbackBaseVmt` trait defines the vtable interface for Steam callback objects. It requires implementing methods for running callbacks, handling API call results, getting the callback parameter size, and destruction. ### Definition ```rust pub trait CCallbackBaseVmt: 'static { // Required methods extern "C" fn run(&mut self, pv_param: *mut P); extern "C" fn run_call( &mut self, pv_param: *mut P, io_failure: bool, api_call: u64, ); extern "C" fn get_callback_size_bytes(&mut self) -> i32; extern "C" fn destructor(&mut self, should_free: bool); } ``` ### Required Methods #### `extern "C" fn run(&mut self, pv_param: *mut P)` Called when the callback is triggered. #### `extern "C" fn run_call(&mut self, pv_param: *mut P, io_failure: bool, api_call: u64)` Called when the callback is triggered as a result of a specific API call. #### `extern "C" fn get_callback_size_bytes(&mut self) -> i32` Returns the size of the parameter struct (`P`). #### `extern "C" fn destructor(&mut self, should_free: bool)` Destructor method for the callback object. ### Dyn Compatibility This trait is dyn compatible (object safe). ### Implementors Implementors of this trait are not listed in the source. ``` -------------------------------- ### Derive Subclass macro syntax Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/derive.Subclass.html?search=u32+-%3E+bool Shows the syntax for applying the Subclass derive macro and the available #[subclass] attribute. The macro requires a crate::rva module with a get() function and a public field named after the struct in snake_case followed by _vmt. ```rust #[derive(Subclass)] { // Attributes available to this derive: #[subclass] } ``` -------------------------------- ### F32Matrix4x4 Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/dl_math/struct.F32Matrix4x4.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Documentation for the F32Matrix4x4 struct, including its definition, tuple fields, constructor, and trait implementations. ```APIDOC ## Struct F32Matrix4x4 ### Description Represents a row-major 4x4 float matrix. ### Definition ```rust #[repr(C, align(16))] pub struct F32Matrix4x4(pub F32Vector4, pub F32Vector4, pub F32Vector4, pub F32Vector4); ``` ### Tuple Fields - `0: F32Vector4` - First row/column vector. - `1: F32Vector4` - Second row/column vector. - `2: F32Vector4` - Third row/column vector. - `3: F32Vector4` - Fourth row/column vector. ### Implementations #### `pub fn new(r0: F32Vector4, r1: F32Vector4, r2: F32Vector4, r3: F32Vector4) -> Self` Constructs a new `F32Matrix4x4` from four row/column vectors. ### Trait Implementations - `Clone` - Provides `clone` and `clone_from` methods. - `Copy` - Marker trait for copy semantics. - `Debug` - Provides `fmt` for formatting. - `From for Mat4` - Converts to `Mat4`. - `From for F32ModelMatrix` - Converts to `F32ModelMatrix`. - `From for F32PackedModelMatrix` - Converts to `F32PackedModelMatrix`. - `From for F32Matrix4x4` - Converts from `F32ModelMatrix`. - `From for F32Matrix4x4` - Converts from `F32PackedModelMatrix`. - `From for F32Matrix4x4` - Converts from `Mat4`. - `PartialEq` - Provides `eq` and `ne` methods. - `StructuralPartialEq` - Marker trait for structural equality. ### Auto Trait Implementations - `Freeze` - `RefUnwindSafe` - `Send` - `Sync` - `Unpin` - `UnsafeUnpin` - `UnwindSafe` ### Blanket Implementations - `Any` - Provides `type_id`. - `Borrow` - Provides `borrow`. - `BorrowMut` - Provides `borrow_mut`. - `CloneToUninit` - Provides `clone_to_uninit` (nightly-only). - `From` - Provides `from`. - `Into` - Provides `into`. - `ToOwned` - Provides `to_owned` and `clone_into`. - `TryFrom` - Provides `try_from`. - `TryInto` - Provides `try_into`. ``` -------------------------------- ### Define the Segment struct with origin and dir fields Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/dl_math/struct.Segment.html?search= Defines a 3D line segment with a starting point and a direction/length vector. The struct is marked with #[repr(C, align(16))] for C-compatible layout and 16-byte alignment, and it derives Clone, Copy, Debug, and PartialEq. ```rust #[repr(C, align(16))] pub struct Segment { pub origin: F32Vector4, pub dir: F32Vector4, } ``` -------------------------------- ### F32Matrix3x3::clone_from Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/dl_math/struct.F32Matrix3x3.html Performs copy-assignment from source. ```APIDOC ## F32Matrix3x3::clone_from ### Description Performs copy-assignment from source. ### Method clone_from ### Parameters - **&mut self** - The destination matrix. - **source** (&F32Matrix3x3) - Required - The source matrix to copy from. ### Returns - **()** - No return value. ### Example ```rust m.clone_from(&m2); ``` ``` -------------------------------- ### for_all_subclasses on trait impl for Subclass Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/attr.for_all_subclasses.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Example usage of the for_all_subclasses attribute on a trait impl. The trait name is not defined and the target is Subclass. The impl must include functions and should have a visibility modifier unless private. This defines a trait with the given name and visibility, then implements it for all subclasses of the given superclass, allowing superclass methods to be called on any subclass. ```rust #[for_all_subclasses] pub impl ChrInsExt for Subclass { fn apply_speffect(&mut self, sp_effect: i32, dont_sync: bool) { let rva = Program::current() .rva_to_va(rva::get().chr_ins_apply_speffect) .unwrap(); let call = unsafe { transmute:: u64>(rva) }; call(self, sp_effect, dont_sync); } fn remove_speffect(&mut self, sp_effect: i32) { let rva = Program::current() .rva_to_va(rva::get().chr_ins_remove_speffect) .unwrap(); let call = unsafe { transmute:: u64>(rva) }; call(self, sp_effect); } } ``` -------------------------------- ### From for F32Matrix3x3 Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/dl_math/struct.F32Matrix3x3.html Converts a Mat3 to a F32Matrix3x3. ```APIDOC ## From for F32Matrix3x3 ### Description Converts a Mat3 to a F32Matrix3x3. ### Method from ### Parameters - **m** (Mat3) - Required - The input matrix. ### Returns - **F32Matrix3x3** - The converted matrix. ### Example ```rust let m = F32Matrix3x3::from(m3); ``` ``` -------------------------------- ### OwnedPtr::new Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/owned_pointer/struct.OwnedPtr.html?search=u32+-%3E+bool Constructs a new OwnedPtr by allocating memory with the game allocator and placing the given value into it. ```APIDOC ## OwnedPtr::new ### Description Allocates memory with the game allocator `A` and places `value` into it. This does not actually allocate if `T` is zero-sized. Any type constructed this way should have an appropriate `Drop::drop` implementation defined. ### Method `pub fn new(value: T) -> Self` ### Parameters - `value` (T) - Required - The value to place into the newly allocated memory. ### Returns - `Self` - The newly created `OwnedPtr` instance. ``` -------------------------------- ### by_ref Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/empty/struct.NonEmptyIter.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a “by reference” adapter for this instance of Iterator. ```APIDOC ## by_ref ### Description Creates a “by reference” adapter for this instance of Iterator. ### Signature fn by_ref(&mut self) -> &mut Self where Self: Sized ### Returns &mut Self - A mutable reference to the iterator. ``` -------------------------------- ### GameVersion::from_lang_version Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/game_version/trait.GameVersion.html?search= Converts a language ID and version string into a GameVersion instance. ```APIDOC ## GameVersion::from_lang_version ### Description Converts a language ID and version string into a GameVersion instance. ### Method `fn from_lang_version(lang_id: u16, version: &str) -> Option` ### Parameters - **lang_id** (u16) - Required - The language identifier. - **version** (&str) - Required - The version string. ### Returns - **Option** - Returns `Some(GameVersion)` if the conversion succeeds, otherwise `None`. ``` -------------------------------- ### product Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/empty/struct.NonEmptyIter.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Iterates over the entire iterator, multiplying all the elements. ```APIDOC ## product ### Description Iterates over the entire iterator, multiplying all the elements. ### Method `fn product

(self) -> P` ### Returns - `P` - The product of all elements. ### Stability Stable since 1.11.0 (const: unstable). ``` -------------------------------- ### NonEmptyIterMut::new Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/empty/struct.NonEmptyIterMut.html?search=u32+-%3E+bool Creates a new NonEmptyIterMut instance. This is a public constructor for the struct. ```APIDOC ## NonEmptyIterMut::new ### Description Creates a new NonEmptyIterMut instance that wraps the provided iterator. ### Method Constructor ### Parameters - **iter** (I) - Required - The underlying iterator to adapt. ### Returns - **NonEmptyIterMut<'a, E, I>** - A new NonEmptyIterMut instance. ``` -------------------------------- ### GameVersion::from_lang_version Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/game_version/trait.GameVersion.html?search=u32+-%3E+bool Converts a language ID and version string into a GameVersion instance, returning None if the version is not recognized. ```APIDOC ## [TRAIT_METHOD] GameVersion::from_lang_version ### Description Converts a language ID and version string into a GameVersion instance, returning None if the version is not recognized. ### Method TRAIT_METHOD ### Endpoint GameVersion::from_lang_version ### Parameters #### Arguments - **lang_id** (u16) - Required - The language identifier. - **version** (&str) - Required - The version string to convert. ### Returns - **Option** - Some(GameVersion) if the version is recognized, None otherwise. ### Example ```rust let version = GameVersion::from_lang_version(0, "1.0.0"); ``` ``` -------------------------------- ### F32PackedModelMatrix Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/dl_math/struct.F32PackedModelMatrix.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Documentation for the F32PackedModelMatrix struct, including its definition, tuple fields, and all public methods and trait implementations. ```APIDOC ## Struct F32PackedModelMatrix ### Description Represents a row-major 4x4 float model matrix packed as a column-major 4x3, discarding the 4th component of each row. Provides methods to create, extract rotation, translation, and individual axes. ### Definition ```rust #[repr(C, align(16))] pub struct F32PackedModelMatrix(pub F32Vector4, pub F32Vector4, pub F32Vector4); ``` ### Tuple Fields - `0: F32Vector4` - `1: F32Vector4` - `2: F32Vector4` ### Implementations #### `new` ```rust pub fn new(r0: F32Vector4, r1: F32Vector4, r2: F32Vector4, r3: F32Vector4) -> Self ``` Packs from an array of row vectors. #### `rotation` ```rust pub fn rotation>(&self) -> T ``` Extracts the rotation matrix. #### `translation` ```rust pub fn translation>(&self) -> T ``` Extracts the translation vector. #### `x_axis` ```rust pub fn x_axis(&self) -> F32Vector4 ``` Extracts the x axis. #### `y_axis` ```rust pub fn y_axis(&self) -> F32Vector4 ``` Extracts the y axis. #### `z_axis` ```rust pub fn z_axis(&self) -> F32Vector4 ``` Extracts the z axis. #### `w_axis` ```rust pub fn w_axis(&self) -> F32Vector4 ``` Extracts the w axis. ### Trait Implementations - `Clone` - `Copy` - `Debug` - `From` - `From` - `From for F32ModelMatrix` - `From for F32Matrix4x4` - `From for Mat4` - `From for F32PackedModelMatrix` - `PartialEq` - `StructuralPartialEq` ``` -------------------------------- ### image Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/program/enum.Program.html?search= Returns the image as a byte slice. ```APIDOC ## image ### Description Returns the image as a byte slice. ### Method N/A (Rust method) ### Parameters None ### Returns - **&'a [u8]** - The image as a byte slice. ``` -------------------------------- ### UnknownPtr::from Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/struct.UnknownPtr.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates an UnknownPtr from a raw usize value. The caller must ensure the value is either 0 or a valid address in the current address space. ```APIDOC ## UnknownPtr::from ### Description Interprets a `usize` value as a pointer. This is an unsafe function because the caller must guarantee the value is either null or a valid address in the current process's memory space. ### Method `pub unsafe fn from(value: usize) -> Self` ### Parameters - `value` (usize) - Required - The raw pointer value to interpret. ### Safety - The caller must ensure that `value` is either 0 or a valid address in the current address space. ### Returns - `Self` - The constructed `UnknownPtr`. ``` -------------------------------- ### new Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/task/struct.RecurringTask.html Creates a new RecurringTask instance with the provided closure. ```APIDOC ## new ### Description Creates a new `RecurringTask` with the given closure that will be called with task data. ### Method new ### Signature ```rust pub fn new(closure: F) -> Self ``` ### Parameters - `closure` (F) - Required - The closure to execute for the recurring task. ### Returns - `Self` - A new `RecurringTask` instance. ``` -------------------------------- ### GameVersion::detect Source: https://docs.rs/fromsoftware-shared/latest/fromsoftware_shared/game_version/trait.GameVersion.html?search=u32+-%3E+bool Detects the game version from a PE module view, returning a Result with DetectError on failure. ```APIDOC ## [TRAIT_METHOD] GameVersion::detect ### Description Detects the game version from a PE module view, returning a Result with DetectError on failure. ### Method TRAIT_METHOD ### Endpoint GameVersion::detect ### Parameters #### Arguments - **module** (&PeView<'_>) - Required - A reference to the PE module view. ### Returns - **Result** - Ok(GameVersion) if detection succeeds, Err(DetectError) otherwise. ### Example ```rust let version = GameVersion::detect(&pe_view)?; ``` ```