Skip to main content

Il2CppValue

Trait Il2CppValue 

Source
pub unsafe trait Il2CppValue: Copy + 'static {
    // Required method
    fn matches(ty: TypeInfo) -> bool;

    // Provided methods
    fn describe() -> &'static str { ... }
    fn is_reference() -> bool { ... }
}
Expand description

A Rust type that has the same representation as some managed types when passed to and from compiled Il2Cpp code.

§Safety

matches may only accept managed types whose values are passed exactly like Self.

Required Methods§

Source

fn matches(ty: TypeInfo) -> bool

Whether values of the managed type ty are passed exactly like Self.

Provided Methods§

Source

fn describe() -> &'static str

The name shown for this type in signature-mismatch errors.

Source

fn is_reference() -> bool

Whether this is a pointer to an object, so it can be the instance (this).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Il2CppValue for ()

Source§

impl Il2CppValue for *mut c_void

ref/out parameters and pointers.

Source§

impl Il2CppValue for bool

Source§

impl Il2CppValue for f32

Source§

impl Il2CppValue for f64

Source§

impl Il2CppValue for i8

Source§

impl Il2CppValue for i16

Source§

impl Il2CppValue for i32

Source§

impl Il2CppValue for i64

Source§

impl Il2CppValue for isize

Source§

impl Il2CppValue for u8

Source§

impl Il2CppValue for u16

Source§

impl Il2CppValue for u32

Source§

impl Il2CppValue for u64

Source§

impl Il2CppValue for usize

Implementors§