engage/generated/system/
int64.rs1#[cfg(feature = "system-int64-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 valuetype::{IValueType, ValueType},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/int64/Int64.md"))]
14 #[repr(C)]
15 #[derive(::core::clone::Clone, ::core::marker::Copy)]
16 pub struct Int64 {
17 pub m_value: i64,
18 }
19 impl ::unity::ClassIdentity for Int64 {
20 const NAME: &'static str = "Int64";
21 const NAMESPACE: &'static str = "System";
22
23 fn class() -> ::unity::Class {
24 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
25 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
26 }
27 }
28 impl ::unity::IlType for Int64 {
29 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
30 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
31 }
32 }
33 impl Int64 {
34 #[inline]
35 pub fn max_value() -> i64 {
36 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
37 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MaxValue");
38 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
39 }
40
41 #[inline]
42 pub fn set_max_value(value: i64) {
43 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
44 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MaxValue");
45 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
46 }
47
48 #[inline]
49 pub fn min_value() -> i64 {
50 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
51 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MinValue");
52 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
53 }
54
55 #[inline]
56 pub fn set_min_value(value: i64) {
57 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
58 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "MinValue");
59 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
60 }
61 }
62}
63
64#[cfg(feature = "system-int64-types")]
65pub use __types::*;
66
67#[cfg(feature = "system-int64")]
68impl Int64 {
69 #[doc = "`Parse(::unity::Il2CppString)` overload"]
70 pub fn parse(s: impl ::core::convert::Into<::unity::Il2CppString>) -> i64 {
71 unsafe {
72 ::unity::il2cpp_call!((::unity::module_base()+0x3260f80usize)as*mut u8,i64;
73(::unity::Il2CppString)::core::convert::Into::into(s))
74 }
75 }
76
77 #[doc = "`TryParse(::unity::Il2CppString, *muti64)` overload"]
78 pub fn try_parse(s: impl ::core::convert::Into<::unity::Il2CppString>) -> (bool, i64) {
79 unsafe {
80 let mut __out_0 = ::core::mem::MaybeUninit::<i64>::uninit();
81 let __ret = {
82 ::unity::il2cpp_call!((::unity::module_base()+0x3261060usize)as*mut u8,bool;
83(::unity::Il2CppString)::core::convert::Into::into(s),(*mut i64)__out_0.as_mut_ptr())
84 };
85 (__ret, __out_0.assume_init())
86 }
87 }
88}
89
90#[cfg(feature = "system-int64")]
91impl Int64 {
92 #[doc = "`CompareTo(crate::system::object::Object)` overload"]
93 pub fn compare_to(&mut self, value: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
94 unsafe {
95 ::unity::il2cpp_call!((::unity::module_base()+0x3260cf0usize)as*mut u8,i32;
96(*mut Int64)self as*mut Int64,(crate::system::object::Object)::core::convert::Into::into(value))
97 }
98 }
99
100 #[doc = "`CompareTo(i64)` overload"]
101 pub fn compare_to_2(&mut self, value: impl ::core::convert::Into<i64>) -> i32 {
102 unsafe {
103 ::unity::il2cpp_call!((::unity::module_base()+0x3260df0usize)as*mut u8,i32;
104(*mut Int64)self as*mut Int64,(i64)::core::convert::Into::into(value))
105 }
106 }
107
108 #[doc = "`Equals(crate::system::object::Object)` overload"]
109 pub fn equals(&mut self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
110 unsafe {
111 ::unity::il2cpp_call!((::unity::module_base()+0x3260e10usize)as*mut u8,bool;
112(*mut Int64)self as*mut Int64,(crate::system::object::Object)::core::convert::Into::into(obj))
113 }
114 }
115
116 #[doc = "`Equals(i64)` overload"]
117 pub fn equals_2(&mut self, obj: impl ::core::convert::Into<i64>) -> bool {
118 unsafe {
119 ::unity::il2cpp_call!((::unity::module_base()+0x3260ea0usize)as*mut u8,bool;
120(*mut Int64)self as*mut Int64,(i64)::core::convert::Into::into(obj))
121 }
122 }
123
124 #[doc = "`GetHashCode()` overload"]
125 pub fn get_hash_code(&mut self) -> i32 {
126 unsafe {
127 ::unity::il2cpp_call!((::unity::module_base()+0x3260eb0usize)as*mut u8,i32;
128(*mut Int64)self as*mut Int64)
129 }
130 }
131
132 #[doc = "`ToString()` overload"]
133 pub fn to_string(&mut self) -> ::unity::Il2CppString {
134 unsafe {
135 ::unity::il2cpp_call!((::unity::module_base()+0x3260ec0usize)as*mut u8, ::unity::Il2CppString;
136(*mut Int64)self as*mut Int64)
137 }
138 }
139}
140
141#[cfg(feature = "system-int64")]
142impl Int64 {
143 pub fn compare_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
144 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
145 }
146
147 pub fn compare_to_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
148 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
149 }
150
151 pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
152 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
153 }
154
155 pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
156 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
157 }
158
159 pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
160 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
161 }
162
163 pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
164 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
165 }
166
167 pub fn parse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
168 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
169 }
170
171 pub fn try_parse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
172 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
173 }
174}
175
176#[cfg(feature = "system-int64")]
177#[doc(hidden)]
178pub mod prelude {
179 pub use super::Int64;
180 #[cfg(feature = "system-object")]
181 pub use crate::system::object::IObjectMethods;
182 #[cfg(feature = "system-valuetype")]
183 pub use crate::system::valuetype::IValueTypeMethods;
184 pub use crate::system::{object::IObject, valuetype::IValueType};
185}