engage/generated/system/collections/generic/
bithelper.rs1#[cfg(feature = "system-collections-generic-bithelper-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/collections/generic/bithelper/BitHelper.md"))]
11 #[::unity::class(namespace = "System.Collections.Generic", name = "BitHelper")]
12 #[parent(crate::system::object::Object)]
13 pub struct BitHelper {
14 #[offset(16)]
15 #[rename(name = "_length")]
16 pub length: i32,
17 #[offset(32)]
18 #[rename(name = "_array")]
19 pub array: ::unity::Array<i32>,
20 #[offset(40)]
21 #[rename(name = "_useStackAlloc")]
22 pub use_stack_alloc: bool,
23 }
24}
25
26#[cfg(feature = "system-collections-generic-bithelper-types")]
27pub use __types::*;
28
29#[cfg(feature = "system-collections-generic-bithelper")]
30impl BitHelper {
31 #[doc = "`ToIntArrayLength(i32)` overload"]
32 pub fn to_int_array_length(n: impl ::core::convert::Into<i32>) -> i32 {
33 unsafe {
34 ::unity::il2cpp_call!((::unity::module_base()+0x2b6dd00usize)as*mut u8,i32;
35(i32)::core::convert::Into::into(n))
36 }
37 }
38}
39
40#[cfg(feature = "system-collections-generic-bithelper")]
41pub trait IBitHelperMethods: IBitHelper {
42 #[doc = "`.ctor(::unity::Array<i32>, i32)` overload"]
43 fn ctor(self, bit_array: impl ::core::convert::Into<::unity::Array<i32>>, length: impl ::core::convert::Into<i32>) -> () {
44 unsafe {
45 let __receiver = <BitHelper as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
46 ::unity::il2cpp_call!((::unity::module_base()+0x2b6dba0usize)as*mut u8,();
47(BitHelper)__receiver,(::unity::Array<i32>)::core::convert::Into::into(bit_array),(i32)::core::convert::Into::into(length))
48 }
49 }
50 #[doc = "`MarkBit(i32)` overload"]
51 fn mark_bit(self, bit_position: impl ::core::convert::Into<i32>) -> () {
52 unsafe {
53 let __receiver = <BitHelper as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
54 ::unity::il2cpp_call!((::unity::module_base()+0x2b6dbf0usize)as*mut u8,();
55(BitHelper)__receiver,(i32)::core::convert::Into::into(bit_position))
56 }
57 }
58 #[doc = "`IsMarked(i32)` overload"]
59 fn is_marked(self, bit_position: impl ::core::convert::Into<i32>) -> bool {
60 unsafe {
61 let __receiver = <BitHelper as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
62 ::unity::il2cpp_call!((::unity::module_base()+0x2b6dc70usize)as*mut u8,bool;
63(BitHelper)__receiver,(i32)::core::convert::Into::into(bit_position))
64 }
65 }
66}
67
68#[cfg(feature = "system-collections-generic-bithelper")]
69impl<__T: IBitHelper> IBitHelperMethods for __T {}
70
71#[cfg(feature = "system-collections-generic-bithelper")]
72impl BitHelper {
73 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
74 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
75 }
76
77 pub fn mark_bit_method_info() -> &'static ::unity::il2cpp::MethodInfo {
78 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
79 }
80
81 pub fn is_marked_method_info() -> &'static ::unity::il2cpp::MethodInfo {
82 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
83 }
84
85 pub fn to_int_array_length_method_info() -> &'static ::unity::il2cpp::MethodInfo {
86 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
87 }
88}
89
90#[cfg(feature = "system-collections-generic-bithelper")]
91impl BitHelper {
92 #[doc = "`.ctor(::unity::Array<i32>, i32)` — overload selector"]
93 pub fn new(bit_array: ::unity::Array<i32>, length: i32) -> Self {
94 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
95 panic!(
96 "{}
97::{}
98 failed to instantiate",
99 ::core::stringify!(BitHelper),
100 ::core::stringify!(new),
101 )
102 });
103 <Self as IBitHelperMethods>::ctor(this, bit_array, length);
104 this
105 }
106}
107
108#[cfg(feature = "system-collections-generic-bithelper")]
109#[doc(hidden)]
110pub mod prelude {
111 pub use super::{BitHelper, IBitHelper, IBitHelperMethods};
112 pub use crate::system::object::IObject;
113 #[cfg(feature = "system-object")]
114 pub use crate::system::object::IObjectMethods;
115}