pub unsafe trait Type: 'static {
    type Held<'a>;
    type HeldRaw;

    const NAMESPACE: &'static str;
    const CLASS_NAME: &'static str;

    fn matches_reference_argument(ty: &Il2CppType) -> bool;
    fn matches_value_argument(ty: &Il2CppType) -> bool;
    fn matches_reference_parameter(ty: &Il2CppType) -> bool;
    fn matches_value_parameter(ty: &Il2CppType) -> bool;

    fn class() -> &'static Il2CppClass { ... }
    fn matches_this_argument(method: &MethodInfo) -> bool { ... }
    fn matches_this_parameter(method: &MethodInfo) -> bool { ... }
    fn matches_returned(ty: &Il2CppType) -> bool { ... }
    fn matches_return(ty: &Il2CppType) -> bool { ... }
}
Expand description

Trait implemented by Rust types that are also C# types

Safety

The Rust and C# types must be ABI-compatible and the trait implementation must be correct

Required Associated Types

Type of the values held in variables of the type

Non-generic version of [Held].

Required Associated Constants

Namespace containingthe class the type represents

Name of the class the type represents

Required Methods

Whether a reference to the type can be used as an argument of the given Il2CppType

Whether a value of the type can be used as an argument of the given Il2CppType

Whether a reference to the type can be used as a parameter of the given Il2CppType

Whether a value of the type can be used as a parameter of the given Il2CppType

Provided Methods

Il2CppClass of the type

Whether the type can be used as a this argument for the given MethodInfo

Whether the type can be used as a this parameter for the given MethodInfo

Whether the type can be used as the value of the given Il2CppType returned from a C# method

Whether the type can be used as the return value of the given Il2CppType for a C# method

Implementations on Foreign Types

Implementors