Skip to main content

engage/generated/system/
sbyte.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-sbyte-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/sbyte/SByte.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct SByte {
17        pub m_value: i8,
18    }
19    impl ::unity::ClassIdentity for SByte {
20        const NAME: &'static str = "SByte";
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 SByte {
29        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
30            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
31        }
32    }
33    impl SByte {
34        #[inline]
35        pub fn max_value() -> i8 {
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: i8) {
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() -> i8 {
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: i8) {
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-sbyte-types")]
65pub use __types::*;
66
67#[cfg(feature = "system-sbyte")]
68impl SByte {
69    #[doc = "`Parse(::unity::Il2CppString)` overload"]
70    pub fn parse(s: impl ::core::convert::Into<::unity::Il2CppString>) -> i8 {
71        unsafe {
72            ::unity::il2cpp_call!((::unity::module_base()+0x34f7110usize)as*mut u8,i8;
73(::unity::Il2CppString)::core::convert::Into::into(s))
74        }
75    }
76}
77
78#[cfg(feature = "system-sbyte")]
79impl SByte {
80    #[doc = "`CompareTo(crate::system::object::Object)` overload"]
81    pub fn compare_to(&mut self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> i32 {
82        unsafe {
83            ::unity::il2cpp_call!((::unity::module_base()+0x34f6d80usize)as*mut u8,i32;
84(*mut SByte)self as*mut SByte,(crate::system::object::Object)::core::convert::Into::into(obj))
85        }
86    }
87
88    #[doc = "`CompareTo(i8)` overload"]
89    pub fn compare_to_2(&mut self, value: impl ::core::convert::Into<i8>) -> i32 {
90        unsafe {
91            ::unity::il2cpp_call!((::unity::module_base()+0x34f6e60usize)as*mut u8,i32;
92(*mut SByte)self as*mut SByte,(i8)::core::convert::Into::into(value))
93        }
94    }
95
96    #[doc = "`Equals(crate::system::object::Object)` overload"]
97    pub fn equals(&mut self, obj: impl ::core::convert::Into<crate::system::object::Object>) -> bool {
98        unsafe {
99            ::unity::il2cpp_call!((::unity::module_base()+0x34f6e70usize)as*mut u8,bool;
100(*mut SByte)self as*mut SByte,(crate::system::object::Object)::core::convert::Into::into(obj))
101        }
102    }
103
104    #[doc = "`Equals(i8)` overload"]
105    pub fn equals_2(&mut self, obj: impl ::core::convert::Into<i8>) -> bool {
106        unsafe {
107            ::unity::il2cpp_call!((::unity::module_base()+0x34f6f00usize)as*mut u8,bool;
108(*mut SByte)self as*mut SByte,(i8)::core::convert::Into::into(obj))
109        }
110    }
111
112    #[doc = "`GetHashCode()` overload"]
113    pub fn get_hash_code(&mut self) -> i32 {
114        unsafe {
115            ::unity::il2cpp_call!((::unity::module_base()+0x34f6f10usize)as*mut u8,i32;
116(*mut SByte)self as*mut SByte)
117        }
118    }
119
120    #[doc = "`ToString()` overload"]
121    pub fn to_string(&mut self) -> ::unity::Il2CppString {
122        unsafe {
123            ::unity::il2cpp_call!((::unity::module_base()+0x34f6f20usize)as*mut u8, ::unity::Il2CppString;
124(*mut SByte)self as*mut SByte)
125        }
126    }
127}
128
129#[cfg(feature = "system-sbyte")]
130impl SByte {
131    pub fn compare_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
132        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
133    }
134
135    pub fn compare_to_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
136        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
137    }
138
139    pub fn equals_method_info() -> &'static ::unity::il2cpp::MethodInfo {
140        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
141    }
142
143    pub fn equals_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
144        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
145    }
146
147    pub fn get_hash_code_method_info() -> &'static ::unity::il2cpp::MethodInfo {
148        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
149    }
150
151    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
152        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
153    }
154
155    pub fn parse_method_info() -> &'static ::unity::il2cpp::MethodInfo {
156        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
157    }
158}
159
160#[cfg(feature = "system-sbyte")]
161#[doc(hidden)]
162pub mod prelude {
163    pub use super::SByte;
164    #[cfg(feature = "system-object")]
165    pub use crate::system::object::IObjectMethods;
166    #[cfg(feature = "system-valuetype")]
167    pub use crate::system::valuetype::IValueTypeMethods;
168    pub use crate::system::{object::IObject, valuetype::IValueType};
169}