Trait QueryTarget

Source
pub unsafe trait QueryTarget: Sealed {
    const ID: u32;

    // Provided method
    fn cast(ptr: *mut c_void) -> &'static Self
       where Self: Sized { ... }
}
Expand description

Type conversion trait implemented for types searchable by query_interface.

This trait is sealed and cannot be implemented for types outside of commonlibsse_ng.

§Safety

This can only be implemented by interfaces defined in SKSE.

Required Associated Constants§

Source

const ID: u32

Query ID

Provided Methods§

Source

fn cast(ptr: *mut c_void) -> &'static Self
where Self: Sized,

Cast to function table(struct)

§Panics(Dev)

ptr is null.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§