load_static_direct

Function load_static_direct 

Source
pub unsafe fn load_static_direct<T: FromStatic>(
    rva: Rva,
) -> InstanceResult<&'static mut T>
Expand 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.

ยงSafety

This has all the same safety requirements as FromStatic::instance. In addition, the caller must ensure that rva points to a valid, initialized instance of T.