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
Required Associated Constants
const CLASS_NAME: &'static str
const CLASS_NAME: &'static str
Name of the class the type represents
Required Methods
fn matches_reference_argument(ty: &Il2CppType) -> bool
fn matches_reference_argument(ty: &Il2CppType) -> bool
Whether a reference to the type can be used as an argument of the given
Il2CppType
fn matches_value_argument(ty: &Il2CppType) -> bool
fn matches_value_argument(ty: &Il2CppType) -> bool
Whether a value of the type can be used as an argument of the given
Il2CppType
fn matches_reference_parameter(ty: &Il2CppType) -> bool
fn matches_reference_parameter(ty: &Il2CppType) -> bool
Whether a reference to the type can be used as a parameter of the given
Il2CppType
fn matches_value_parameter(ty: &Il2CppType) -> bool
fn matches_value_parameter(ty: &Il2CppType) -> bool
Whether a value of the type can be used as a parameter of the given
Il2CppType
Provided Methods
fn class() -> &'static Il2CppClass
fn class() -> &'static Il2CppClass
Il2CppClass
of the type
fn matches_this_argument(method: &MethodInfo) -> bool
fn matches_this_argument(method: &MethodInfo) -> bool
Whether the type can be used as a this
argument for the given
MethodInfo
fn matches_this_parameter(method: &MethodInfo) -> bool
fn matches_this_parameter(method: &MethodInfo) -> bool
Whether the type can be used as a this
parameter for the given
MethodInfo
fn matches_returned(ty: &Il2CppType) -> bool
fn matches_returned(ty: &Il2CppType) -> bool
Whether the type can be used as the value of the given Il2CppType
returned from a C# method
fn matches_return(ty: &Il2CppType) -> bool
fn matches_return(ty: &Il2CppType) -> bool
Whether the type can be used as the return value of the given
Il2CppType
for a C# method