From aa3222fdde715fe097c831c48fc025e34247498a Mon Sep 17 00:00:00 2001 From: RipleyTom Date: Wed, 31 Jul 2024 08:18:40 +0200 Subject: [PATCH] RPCN 1.3 --- .github/workflows/rust.yml | 6 +- .gitignore | 1 + CHANGELOG.md | 28 + Cargo.lock | 543 ++-- Cargo.toml | 4 +- rpcn.cfg | 3 + scoreboards.cfg | 35 +- server_redirs.cfg | 6 +- servers.cfg | 184 +- src/main.rs | 38 +- src/server.rs | 11 +- src/server/client.rs | 62 +- src/server/client/cmd_account.rs | 12 +- src/server/client/cmd_misc.rs | 18 +- src/server/client/cmd_room.rs | 12 +- src/server/client/cmd_room_gui.rs | 149 + src/server/client/notifications.rs | 7 + src/server/client/ticket.rs | 4 +- src/server/database.rs | 85 +- src/server/gui_room_manager.rs | 779 +++++ src/server/room_manager.rs | 58 +- src/server/score_cache.rs | 7 +- src/server/stream_extractor.rs | 16 +- src/server/stream_extractor/np2_structs.fbs | 85 +- .../stream_extractor/np2_structs_generated.rs | 2586 ++++++++++++++--- 25 files changed, 3798 insertions(+), 941 deletions(-) create mode 100644 src/server/client/cmd_room_gui.rs create mode 100644 src/server/gui_room_manager.rs diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 50c90e5..59bb3ce 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,10 +21,11 @@ jobs: - name: Create artifact run: cd artifact && tar -zcvf ../rpcn-linux.tar.gz ./ && cd .. - name: Upload artifact - uses: actions/upload-artifact@v1.0.0 + uses: actions/upload-artifact@v4.0.0 with: name: rpcn path: rpcn-linux.tar.gz + compression-level: 9 - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') @@ -49,10 +50,11 @@ jobs: - name: Create artifact run: Compress-Archive -Path artifact-win/* -Destination rpcn-win.zip - name: Upload artifact - uses: actions/upload-artifact@v1.0.0 + uses: actions/upload-artifact@v4.0.0 with: name: rpcn-win path: rpcn-win.zip + compression-level: 9 - name: Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') diff --git a/.gitignore b/.gitignore index f74eeb9..3c21528 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /.vscode/** /db/** ticket_private.pem +key.pem diff --git a/CHANGELOG.md b/CHANGELOG.md index 75eb4de..064a763 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.3.0] - 2024-09- + +### Added + +- Added a configuration setting letting you set admins rights for specific usernames(set on launch or at account creation) +- Added commands to support old GUI API (CreateRoomGUI, JoinRoomGUI, LeaveRoomGUI, GetRoomListGUI, SetRoomSearchFlagGUI, GetRoomSearchFlagGUI, SetRoomInfoGUI, GetRoomInfoGUI, QuickMatchGUI, SearchJoinGUI) + +### Changed + +- Changed the default ranking limit(number of scores ranked per table) from 100 to 250 +- Ticket issuer ID was changed to 0x100(from 0x33333333) as Tony Hawk: SHRED was found to be checking this value + +### Fixed + +- Allow all messages but invites to be sent to non-friends +- Fixed score cache last insertion/update time not being updated on insert +- Fixed SceNpCommunicationId to reflect the sub_id +- Fixed startIndex in Matching2 search requests not being interpreted and being set wrong in the reply +- Fixed user_rooms not being appropriately updated when removed from the room forcefully(ie room destroyed) +- Fixed SCE_NP_MATCHING2_ROOMMEMBER_FLAG_ATTR_OWNER not being set for the member becoming the new owner if the succession didn't go through the list +- Ninetime: added servers for all Arcsys games so they should work now(BBCT, BBCSE, BBCPE, BBCF, P4A, P4AU, UNIEL) and for a few other games(Outrun Online Arcade, SCV, KOF13) +- CookiePLMonster: Fixed scoreboards ordering/rules for RR7, Crazy Taxi, GTHD, Daytona USA, Wrecked, Hotline Miami 2 + +### Misc + +- Updated dependencies + + ## [1.2.4] - 2024-03-23 ### Fixed diff --git a/Cargo.lock b/Cargo.lock index ee743ed..5bcb788 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" @@ -31,41 +31,47 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "atomic-waker" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] @@ -74,6 +80,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "bitflags" version = "1.3.2" @@ -82,9 +94,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "blake2b_simd" @@ -99,21 +111,30 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] -name = "bytes" +name = "byteorder" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "cc" -version = "1.0.90" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -123,9 +144,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "core-foundation" @@ -139,31 +160,31 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "email-encoding" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbfb21b9878cf7a348dcb8559109aabc0ec40d69924bd706fa5149846c4fef75" +checksum = "a87260449b06739ee78d6281c68d2a0ff3e3af64a78df63d3a1aeb3c06997c8a" dependencies = [ - "base64", + "base64 0.22.1", "memchr", ] [[package]] name = "email_address" -version = "0.2.4" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" +checksum = "e079f19b08ca6239f47f8ba8509c11cf3ea30095831f7fed61441475edd8c449" [[package]] name = "equivalent" @@ -173,9 +194,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -204,15 +225,15 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "flatbuffers" -version = "23.5.26" +version = "24.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dac53e22462d78c16d64a1cd22371b54cc3fe94aa15e7886a2fa6e5d1ab8640" +checksum = "8add37afff2d4ffa83bc748a70b4b1370984f6980768554182424ef71447c35f" dependencies = [ "bitflags 1.3.2", "rustc_version", @@ -289,9 +310,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -300,21 +321,21 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "h2" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ + "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "futures-util", "http", "indexmap", "slab", @@ -325,9 +346,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", @@ -372,9 +393,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", @@ -382,9 +403,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -394,9 +415,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", @@ -415,9 +436,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" dependencies = [ "bytes", "futures-channel", @@ -426,7 +447,7 @@ dependencies = [ "http-body", "hyper", "pin-project-lite", - "socket2 0.5.6", + "socket2 0.5.7", "tokio", "tower", "tower-service", @@ -445,9 +466,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown", @@ -455,33 +476,33 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lettre" @@ -489,7 +510,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76bd09637ae3ec7bd605b8e135e757980b3968430ff2b1a4a94fb7769e50166d" dependencies = [ - "base64", + "base64 0.21.7", "email-encoding", "email_address", "fastrand 1.9.0", @@ -508,9 +529,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libsqlite3-sys" @@ -525,15 +546,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -541,9 +562,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "match_cfg" @@ -553,9 +574,9 @@ checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -571,31 +592,31 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -640,28 +661,18 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "object" -version = "0.32.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -674,11 +685,11 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -695,7 +706,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.77", ] [[package]] @@ -706,18 +717,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.2.3+3.2.1" +version = "300.3.2+3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" +checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.101" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -734,9 +745,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -744,15 +755,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -772,14 +783,14 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.77", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -795,24 +806,27 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -876,11 +890,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] @@ -915,7 +929,7 @@ dependencies = [ [[package]] name = "rpcn" -version = "1.2.4" +version = "1.3.0" dependencies = [ "flatbuffers", "hyper", @@ -959,7 +973,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5885493fdf0be6cdff808d1533ce878d21cfa49c7086fa00c66355cd9141bfc" dependencies = [ - "base64", + "base64 0.21.7", "blake2b_simd", "constant_time_eq", "crossbeam-utils", @@ -967,26 +981,26 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -1011,16 +1025,16 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64", + "base64 0.21.7", ] [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1050,11 +1064,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -1063,9 +1077,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -1073,9 +1087,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "sharded-slab" @@ -1086,11 +1100,17 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -1106,9 +1126,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -1122,9 +1142,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1155,9 +1175,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.53" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -1166,14 +1186,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", - "fastrand 2.0.1", + "fastrand 2.1.1", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1188,9 +1209,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -1203,32 +1224,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.6", + "socket2 0.5.7", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.77", ] [[package]] @@ -1244,16 +1264,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -1269,20 +1288,19 @@ dependencies = [ "tokio", "tower-layer", "tower-service", - "tracing", ] [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -1290,7 +1308,6 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -1304,7 +1321,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.77", ] [[package]] @@ -1356,15 +1373,15 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -1395,9 +1412,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "want" @@ -1416,34 +1433,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1451,28 +1469,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -1510,154 +1528,105 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] -name = "windows_i686_gnu" -version = "0.52.4" +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.77", ] diff --git a/Cargo.toml b/Cargo.toml index ce650df..d024b1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rpcn" -version = "1.2.4" +version = "1.3.0" authors = ["RipleyTom "] edition = "2021" @@ -9,7 +9,7 @@ num-traits = "0.2" num-derive = "0.3" rand = "0.8" rust-argon2 = "1.0" -flatbuffers = "23.5.26" +flatbuffers = "24.3.25" parking_lot = "0.12" libsqlite3-sys = "0.25" rusqlite = { version = "0.28", features = [ "bundled" ] } diff --git a/rpcn.cfg b/rpcn.cfg index 5f6681b..465554d 100644 --- a/rpcn.cfg +++ b/rpcn.cfg @@ -25,3 +25,6 @@ SignTicketsDigest=SHA224 StatServer=false StatServerHost=0.0.0.0 StatServerPort=31314 +# List of admin usernames, separated by a comma("AdminsList=yournickname,friendnickname") +# Make sure to create those accounts before making the server public +AdminsList= diff --git a/scoreboards.cfg b/scoreboards.cfg index 9d127dd..937a0d3 100644 --- a/scoreboards.cfg +++ b/scoreboards.cfg @@ -8,32 +8,33 @@ #ASCENDING_ORDER #Ridge Racer 7 -NPWR00001|0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 -NPWR00001|352,353,354,355|250|FORCE_UPDATE|DESCENDING_ORDER|10|6000000 +NPWR00001_00|0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR00001_00|352,353,354,355|250|FORCE_UPDATE|DESCENDING_ORDER|10|6000000 +NPWR00001_01|0,1|250|NORMAL_UPDATE|DESCENDING_ORDER|10|6000000 #Gran Turismo HD Concept (JP) -NPWR00010|1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,65,66|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR00010_00|1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,65,66|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 #Gran Turismo HD Concept (US) -NPWR00064|1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,65,66|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR00064_00|1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,65,66|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 #Gran Turismo HD Concept (Asia) -NPWR00065|1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,65,66|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR00065_00|1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,65,66|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 #Gran Turismo HD Concept (EU) -NPWR00091|1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,65,66|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR00091_00|1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,65,66|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 #GTI Club -NPWR00284|0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR00284_00|0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 #Sonic the Hedgehog 4: Episode I -NPWR00954|0,1,2,6,7,8,12,13,14,19,24,25,26,30,31,32,36,37,38,43,48,49,50,54,55,56,60,61,62,67,72,73,74,78,79,80,84,85,86,91,97,102,104,106,108,110,112,114|250|NORMAL_UPDATE|DESCENDING_ORDER|10|6000000 -NPWR00954|3,4,5,9,10,11,15,16,17,22,27,28,29,33,34,35,39,40,41,46,51,52,53,57,58,59,63,64,65,70,75,76,77,81,82,83,87,88,89,94,100,103,105,107,109,111,113,115|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR00954_00|0,1,2,6,7,8,12,13,14,19,24,25,26,30,31,32,36,37,38,43,48,49,50,54,55,56,60,61,62,67,72,73,74,78,79,80,84,85,86,91,97,102,104,106,108,110,112,114|250|NORMAL_UPDATE|DESCENDING_ORDER|10|6000000 +NPWR00954_00|3,4,5,9,10,11,15,16,17,22,27,28,29,33,34,35,39,40,41,46,51,52,53,57,58,59,63,64,65,70,75,76,77,81,82,83,87,88,89,94,100,103,105,107,109,111,113,115|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 #Crazy Taxi -NPWR01440|9,10,11,13,14,15,16,17,18,19,21,22,23|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR01440_00|9,10,11,13,14,15,16,17,18,19,21,22,23|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 #Daytona USA -NPWR01815|1,2,3|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR01815_00|1,2,3|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 #Wrecked: Revenge Revisited -NPWR01856|0,1,2,3,4,5,6,7,8,9,10,11,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,42,43,44,45,46,47|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR01856_00|0,1,2,3,4,5,6,7,8,9,10,11,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,42,43,44,45,46,47|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 #Sonic the Hedgehog 4: Episode II -NPWR02484|0,1,2,6,7,8,12,13,14,18,19,20,24,25,26,30,31,32,36,37,38,42,43,44,48,49,50,54,55,56,60,61,62,66,67,68,72,73,74,78,79,80,84,85,86,90,91,92,96,97,98,102,103,104,108,109,110,114,115,116,120,121,122,126,127,128,132,133,134,138,139,140,144,145,146,150,151,152,156,157,158,162,163,164,168,169,170,174,175,176,180,181,182,186,187,188,192,193,194,198,199,200,204,205,206,210,211,212,216,218,220,222,224,226,228,230,232,234,236,238,240,242|250|NORMAL_UPDATE|DESCENDING_ORDER|10|6000000 -NPWR02484|3,4,5,9,10,11,15,16,17,21,22,23,27,28,29,33,34,35,39,40,41,45,46,47,51,52,53,57,58,59,63,64,65,69,70,71,75,76,77,81,82,83,87,88,89,93,94,95,99,100,101,105,106,107,111,112,113,117,118,119,123,124,125,129,130,131,135,136,137,141,142,143,147,148,149,153,154,155,159,160,161,165,166,167,171,172,173,177,178,179,183,184,185,189,190,191,195,196,197,201,202,203,207,208,209,213,214,215,217,219,221,223,225,227,229,231,233,235,237,239,241,243|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR02484_00|0,1,2,6,7,8,12,13,14,18,19,20,24,25,26,30,31,32,36,37,38,42,43,44,48,49,50,54,55,56,60,61,62,66,67,68,72,73,74,78,79,80,84,85,86,90,91,92,96,97,98,102,103,104,108,109,110,114,115,116,120,121,122,126,127,128,132,133,134,138,139,140,144,145,146,150,151,152,156,157,158,162,163,164,168,169,170,174,175,176,180,181,182,186,187,188,192,193,194,198,199,200,204,205,206,210,211,212,216,218,220,222,224,226,228,230,232,234,236,238,240,242|250|NORMAL_UPDATE|DESCENDING_ORDER|10|6000000 +NPWR02484_00|3,4,5,9,10,11,15,16,17,21,22,23,27,28,29,33,34,35,39,40,41,45,46,47,51,52,53,57,58,59,63,64,65,69,70,71,75,76,77,81,82,83,87,88,89,93,94,95,99,100,101,105,106,107,111,112,113,117,118,119,123,124,125,129,130,131,135,136,137,141,142,143,147,148,149,153,154,155,159,160,161,165,166,167,171,172,173,177,178,179,183,184,185,189,190,191,195,196,197,201,202,203,207,208,209,213,214,215,217,219,221,223,225,227,229,231,233,235,237,239,241,243|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 #Sonic CD -NPWR02783|0|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 -NPWR02783|1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21|250|NORMAL_UPDATE|DESCENDING_ORDER|10|6000000 +NPWR02783_00|0|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR02783_00|1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21|250|NORMAL_UPDATE|DESCENDING_ORDER|10|6000000 #Hotline Miami 2: Wrong Number -NPWR06254|2,3,6,7,10,11,14,15,18,19,22,23,26,27,30,31,34,35,38,39,42,43,46,47,50,51,54,55,58,59,62,63,66,67,70,71,74,75,78,79,82,83,86,87,90,91,94,95,98,99,102,103|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 +NPWR06254_00|2,3,6,7,10,11,14,15,18,19,22,23,26,27,30,31,34,35,38,39,42,43,46,47,50,51,54,55,58,59,62,63,66,67,70,71,74,75,78,79,82,83,86,87,90,91,94,95,98,99,102,103|250|NORMAL_UPDATE|ASCENDING_ORDER|10|6000000 diff --git a/server_redirs.cfg b/server_redirs.cfg index bac2a40..ccb9265 100644 --- a/server_redirs.cfg +++ b/server_redirs.cfg @@ -1,5 +1,5 @@ #DeS (redir to EU) -NPWR00245=>NPWR01249 -NPWR00881=>NPWR01249 +NPWR00245_00=>NPWR01249_00 +NPWR00881_00=>NPWR01249_00 #JoJo ASB (redir to US, doesn't work :x) -#NPWR03545(jp) NPWR05840(us) \ No newline at end of file +#NPWR03545(jp) NPWR05840(us) diff --git a/servers.cfg b/servers.cfg index ae5d735..adfb56f 100644 --- a/servers.cfg +++ b/servers.cfg @@ -1,126 +1,126 @@ #This file describes servers to be created for games more complex than 1 server / 1 world #The format is communication_id|server|world|lobbies(separated by comma) #Tekken 6(tested) -NPWR00482|1|1| -NPWR00482|1|2| -NPWR00482|1|3| -NPWR00482|1|4| +NPWR00482_00|1|1| +NPWR00482_00|1|2| +NPWR00482_00|1|3| +NPWR00482_00|1|4| #MGS:PW -NPWR01848|1|1| -NPWR01848|1|2| -NPWR01848|1|3| +NPWR01848_00|1|1| +NPWR01848_00|1|2| +NPWR01848_00|1|3| #DBZ:Battle of Z -NPWR04847|1|1| -NPWR04847|1|2| -NPWR04847|1|3| -NPWR04847|1|4| +NPWR04847_00|1|1| +NPWR04847_00|1|2| +NPWR04847_00|1|3| +NPWR04847_00|1|4| #Puyo Puyo -NPWR04945|1|1| -NPWR04945|1|2| -NPWR04945|1|3| -NPWR04945|1|4| -NPWR04945|1|5| -NPWR04945|1|6| +NPWR04945_00|1|1| +NPWR04945_00|1|2| +NPWR04945_00|1|3| +NPWR04945_00|1|4| +NPWR04945_00|1|5| +NPWR04945_00|1|6| #Sword Art Online: Lost Song -NPWR08257|1|1| -NPWR08257|1|2| -NPWR08257|1|3| -NPWR08257|1|4| -NPWR08257|1|5| +NPWR08257_00|1|1| +NPWR08257_00|1|2| +NPWR08257_00|1|3| +NPWR08257_00|1|4| +NPWR08257_00|1|5| #Naruto Shippuuden: Narutimate Storm Generation (untested) -NPWR01886|1|1| -NPWR01886|1|2| +NPWR01886_00|1|1| +NPWR01886_00|1|2| #Naruto Shippuden: Ultimate Ninja Storm Revolution (untested) -NPWR06010|1|1| -NPWR06010|1|2| +NPWR06010_00|1|1| +NPWR06010_00|1|2| #JoJo's Bizarre Adventure - All-Star Battle (untested) -NPWR05840|1|1| -NPWR05840|1|2| +NPWR05840_00|1|1| +NPWR05840_00|1|2| #Gladiator VS (untested) -NPWR02544|1|1| -NPWR02544|1|2| +NPWR02544_00|1|1| +NPWR02544_00|1|2| #Virtua Tennis 4 (untested) -NPWR01224|1|1| -NPWR01224|1|2| +NPWR01224_00|1|1| +NPWR01224_00|1|2| #Armored Core V (untested) -NPWR03050|1|1| -NPWR03050|1|2| +NPWR03050_00|1|1| +NPWR03050_00|1|2| #Nascar '15 (untested) -NPWR09007|1|1| -NPWR09007|1|2| +NPWR09007_00|1|1| +NPWR09007_00|1|2| #.hack//Versus (untested) -NPWR01946|1|1| -NPWR01946|1|2| +NPWR01946_00|1|1| +NPWR01946_00|1|2| #Naruto Shippuden: Ultimate Ninja Storm 2 -NPWR00637|1|1| -NPWR00637|1|2| +NPWR00637_00|1|1| +NPWR00637_00|1|2| #機動戦士ガンダム エクストリームバーサス フルブースト -NPWR04269|1|1| -NPWR04269|1|2| -NPWR04269|1|3| -NPWR04269|1|4| +NPWR04269_00|1|1| +NPWR04269_00|1|2| +NPWR04269_00|1|3| +NPWR04269_00|1|4| #Saint Seiya: Brave Soldiers -NPWR04207|1|1| -NPWR04207|1|2| -NPWR04207|1|3| -NPWR04207|1|4| +NPWR04207_00|1|1| +NPWR04207_00|1|2| +NPWR04207_00|1|3| +NPWR04207_00|1|4| #Saint Seiya: Soldiers' Soul -NPWR08977|1|1| -NPWR08977|1|2| -NPWR08977|1|3| -NPWR08977|1|4| +NPWR08977_00|1|1| +NPWR08977_00|1|2| +NPWR08977_00|1|3| +NPWR08977_00|1|4| #PlayStation Home -NPWR00432|1|65537| -NPWR00432|1|65538| -NPWR00432|1|65539| -NPWR00432|1|65540| -NPWR00432|1|65541| -NPWR00432|1|65542| -NPWR00432|1|65543| -NPWR00432|1|65544| -NPWR00432|1|65545| -NPWR00432|1|65546| +NPWR00432_00|1|65537| +NPWR00432_00|1|65538| +NPWR00432_00|1|65539| +NPWR00432_00|1|65540| +NPWR00432_00|1|65541| +NPWR00432_00|1|65542| +NPWR00432_00|1|65543| +NPWR00432_00|1|65544| +NPWR00432_00|1|65545| +NPWR00432_00|1|65546| #Metal Slug 3 -NPWR08648|1|65537| +NPWR08648_00|1|65537| #BBCT -NPWR00656|1|1| -NPWR00656|1|2| +NPWR00656_00|1|1| +NPWR00656_00|1|2| #BBCSE -NPWR02565|1|1| -NPWR02565|1|2| +NPWR02565_00|1|1| +NPWR02565_00|1|2| #BBCPE -NPWR07753|1|1| -NPWR07753|1|2| -NPWR07753|1|3| +NPWR07753_00|1|1| +NPWR07753_00|1|2| +NPWR07753_00|1|3| #BBCF -NPWR10301|1|1| -NPWR10301|1|2| -NPWR10301|1|3| +NPWR10301_00|1|1| +NPWR10301_00|1|2| +NPWR10301_00|1|3| #P4A -NPWR02915|1|1| -NPWR02915|1|2| -NPWR02915|1|3| +NPWR02915_00|1|1| +NPWR02915_00|1|2| +NPWR02915_00|1|3| #P4AU -NPWR06200|1|1| -NPWR06200|1|2| -NPWR06200|1|3| +NPWR06200_00|1|1| +NPWR06200_00|1|2| +NPWR06200_00|1|3| #UNIEL -NPWR06112|1|1| -NPWR06112|1|2| +NPWR06112_00|1|1| +NPWR06112_00|1|2| #Outrun Online Arcade -NPWR00458|1|1| -NPWR00458|1|2| -NPWR00458|1|3| +NPWR00458_00|1|1| +NPWR00458_00|1|2| +NPWR00458_00|1|3| #SoulCalibur V -NPWR01738|1|1| -NPWR01738|1|2| +NPWR01738_00|1|1| +NPWR01738_00|1|2| #King of Fighters XIII -NPWR02645|1|1| -NPWR02645|1|2| +NPWR02645_00|1|1| +NPWR02645_00|1|2| #AH3 -NPWR01464|1|1| -NPWR01464|1|2| +NPWR01464_00|1|1| +NPWR01464_00|1|2| #AH3LM!!!!! -NPWR06231|1|1| -NPWR06231|1|2| +NPWR06231_00|1|1| +NPWR06231_00|1|2| diff --git a/src/main.rs b/src/main.rs index 8c479d4..9c4f398 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ use std::io::Read; use std::str::FromStr; mod server; -use server::client::ComId; +use server::client::{Client, ComId, COMMUNICATION_ID_SIZE}; use server::Server; use openssl::ec::EcKey; @@ -31,6 +31,7 @@ pub struct Config { server_redirs: HashMap, ticket_signature_info: Option, stat_server_host_and_port: Option<(String, String)>, + admins_list: Vec, } impl Config { @@ -48,6 +49,7 @@ impl Config { server_redirs: HashMap::new(), ticket_signature_info: None, stat_server_host_and_port: None, + admins_list: Vec::new(), } } @@ -103,6 +105,32 @@ impl Config { } }; + let set_admins_list = |d_list: &mut Vec| { + if let Some(data) = config_data.get("AdminsList") { + let admins_list: Vec = data.split(',').map(|a| a.trim().to_string()).collect(); + + if admins_list.iter().map(|username| Client::is_valid_username(username)).any(|r| !r) { + println!("AdminsList contains an invalid username, the setting will be ignored!"); + } else { + *d_list = admins_list; + } + } else { + println!("Configuration entry for AdminsList was not found, leaving it empty"); + } + }; + + // Unused for now + // let set_u32 = |name: &str, d_u32: &mut u32| { + // if let Some(data) = config_data.get(name) { + // match data.parse::() { + // Ok(parsed) => *d_u32 = parsed, + // Err(e) => println!("Failed to parse value for <{}>, defaulting to <{}>: {}", name, d_u32, e), + // } + // } else { + // println!("Configuration entry for <{}> was not found, defaulting to <{}>", name, d_u32); + // } + // }; + set_bool("CreateMissing", &mut self.create_missing); set_verbosity(&mut self.verbosity); set_bool("EmailValidated", &mut self.email_validated); @@ -159,6 +187,8 @@ impl Config { } } + set_admins_list(&mut self.admins_list); + Ok(()) } @@ -205,7 +235,7 @@ impl Config { .lines() .filter_map(|line| { let parsed: Vec<&[u8]> = line.trim().split("=>").map(|x| x.trim()).map(|x| x.as_bytes()).collect(); - if line.is_empty() || line.chars().nth(0).unwrap() == '#' || parsed.len() != 2 || parsed[0].len() != 9 || parsed[1].len() != 9 { + if line.is_empty() || line.chars().nth(0).unwrap() == '#' || parsed.len() != 2 || parsed[0].len() != COMMUNICATION_ID_SIZE || parsed[1].len() != COMMUNICATION_ID_SIZE { None } else { Some((parsed[0].try_into().unwrap(), parsed[1].try_into().unwrap())) @@ -230,6 +260,10 @@ impl Config { &self.stat_server_host_and_port } + pub fn get_admins_list(&self) -> &Vec { + &self.admins_list + } + fn load_ticket_private_key() -> Result, String> { let mut private_key_file = File::open("ticket_private.pem").map_err(|e| format!("Failed to open ticket_private.pem: {}", e))?; let mut private_key_raw = Vec::new(); diff --git a/src/server.rs b/src/server.rs index 0040ec8..5ca5670 100644 --- a/src/server.rs +++ b/src/server.rs @@ -23,6 +23,8 @@ use client::{Client, ClientSharedInfo, PacketType, SharedData, TerminateWatch, H mod database; mod game_tracker; use game_tracker::GameTracker; +mod gui_room_manager; +use gui_room_manager::GuiRoomManager; mod room_manager; use room_manager::RoomManager; mod score_cache; @@ -34,11 +36,12 @@ use crate::Config; #[allow(non_snake_case, dead_code)] mod stream_extractor; -const PROTOCOL_VERSION: u32 = 24; +const PROTOCOL_VERSION: u32 = 25; pub struct Server { config: Arc>, db_pool: r2d2::Pool, + gui_room_manager: Arc>, room_manager: Arc>, client_infos: Arc>>, score_cache: Arc, @@ -50,7 +53,7 @@ impl Server { pub fn new(config: Config) -> Result { let config = Arc::new(RwLock::new(config)); - let db_pool = Server::initialize_database()?; + let db_pool = Server::initialize_database(config.read().get_admins_list())?; let score_cache = Server::initialize_score(db_pool.get().map_err(|e| format!("Failed to get a database connection: {}", e))?)?; Server::initialize_tus_data_handler()?; @@ -59,6 +62,7 @@ impl Server { Server::clean_score_data(db_pool.get().map_err(|e| format!("Failed to get a database connection: {}", e))?)?; Server::clean_tus_data(db_pool.get().map_err(|e| format!("Failed to get a database connection: {}", e))?)?; + let gui_room_manager = Arc::new(RwLock::new(GuiRoomManager::new())); let room_manager = Arc::new(RwLock::new(RoomManager::new())); let client_infos = Arc::new(RwLock::new(HashMap::new())); let game_tracker = Arc::new(GameTracker::new()); @@ -67,6 +71,7 @@ impl Server { Ok(Server { config, db_pool, + gui_room_manager, room_manager, client_infos, score_cache, @@ -168,7 +173,7 @@ impl Server { let acceptor = acceptor.clone(); let config = self.config.clone(); let db_pool = self.db_pool.clone(); - let shared = SharedData::new(self.room_manager.clone(), self.client_infos.clone(), self.score_cache.clone(), self.game_tracker.clone(), self.cleanup_duty.clone()); + let shared = SharedData::new(self.gui_room_manager.clone(), self.room_manager.clone(), self.client_infos.clone(), self.score_cache.clone(), self.game_tracker.clone(), self.cleanup_duty.clone()); let servinfo_vec = servinfo_vec.clone(); let term_watch = term_watch.clone(); let fut_client = async move { diff --git a/src/server/client.rs b/src/server/client.rs index 5f3aa8a..04a020f 100644 --- a/src/server/client.rs +++ b/src/server/client.rs @@ -3,6 +3,7 @@ mod cmd_admin; mod cmd_friend; mod cmd_misc; mod cmd_room; +mod cmd_room_gui; mod cmd_score; mod cmd_server; mod cmd_session; @@ -10,7 +11,7 @@ pub mod cmd_tus; mod ticket; -mod notifications; +pub mod notifications; use std::collections::{HashMap, HashSet}; use std::sync::Arc; @@ -33,6 +34,7 @@ use crate::server::client::notifications::NotificationType; use crate::server::client::ticket::Ticket; use crate::server::database::Database; use crate::server::game_tracker::GameTracker; +use crate::server::gui_room_manager::GuiRoomManager; use crate::server::room_manager::{RoomManager, SignalParam, SignalingType}; use crate::server::score_cache::ScoresCache; use crate::server::stream_extractor::fb_helpers::*; @@ -43,7 +45,8 @@ use crate::Config; pub const HEADER_SIZE: u32 = 15; pub const MAX_PACKET_SIZE: u32 = 0x800000; // 8MiB -pub type ComId = [u8; 9]; +pub const COMMUNICATION_ID_SIZE: usize = 12; +pub type ComId = [u8; COMMUNICATION_ID_SIZE]; #[derive(Clone)] pub struct ClientInfo { @@ -106,7 +109,8 @@ impl ClientSharedPresence { } pub fn dump_empty(vec: &mut Vec) { - vec.extend([0; 9]); // com_id + const VEC_EMPTY_COMID: [u8; COMMUNICATION_ID_SIZE] = [0, 0, 0, 0, 0, 0, 0, 0, 0, b'_', b'0', b'0']; + vec.extend(VEC_EMPTY_COMID); // com_id vec.push(0); // title vec.push(0); // status string vec.push(0); // comment @@ -160,6 +164,7 @@ impl TerminateWatch { #[derive(Clone)] pub struct SharedData { + gui_room_manager: Arc>, room_manager: Arc>, client_infos: Arc>>, score_cache: Arc, @@ -242,6 +247,16 @@ enum CommandType { TusDeleteMultiSlotData, ClearPresence, SetPresence, + CreateRoomGUI, + JoinRoomGUI, + LeaveRoomGUI, + GetRoomListGUI, + SetRoomSearchFlagGUI, + GetRoomSearchFlagGUI, + SetRoomInfoGUI, + GetRoomInfoGUI, + QuickMatchGUI, + SearchJoinRoomGUI, UpdateDomainBans = 0x0100, TerminateServer, } @@ -303,6 +318,7 @@ pub fn com_id_to_string(com_id: &ComId) -> String { impl SharedData { pub fn new( + gui_room_manager: Arc>, room_manager: Arc>, client_infos: Arc>>, score_cache: Arc, @@ -310,6 +326,7 @@ impl SharedData { cleanup_duty: Arc>>, ) -> SharedData { SharedData { + gui_room_manager, room_manager, client_infos, score_cache, @@ -324,14 +341,22 @@ impl Drop for Client { // This code is here instead of at the end of process in case of thread panic to ensure user is properly 'cleaned out' of the system if self.authentified { self.shared.cleanup_duty.write().insert(self.client_info.user_id); - let mut self_clone = self.clone(); + let mut self_clone = Box::new(self.clone()); // We box the clone in order to avoid stack issues when a lot of users drop(shutdown) task::spawn(async move { // leave all rooms user is still in let rooms = self_clone.shared.room_manager.read().get_rooms_by_user(self_clone.client_info.user_id); + if let Some(rooms) = rooms { + for (com_id, room_id) in rooms { + self_clone.leave_room(&com_id, room_id, None, EventCause::MemberDisappeared).await; + } + } + + let rooms = self_clone.shared.gui_room_manager.read().get_rooms_by_user(self_clone.client_info.user_id); + if let Some(rooms) = rooms { for room in rooms { - self_clone.leave_room(&self_clone.shared.room_manager, &room.0, room.1, None, EventCause::MemberDisappeared).await; + let _ = self_clone.leave_room_gui(&room).await; } } @@ -644,6 +669,16 @@ impl Client { CommandType::TusDeleteMultiSlotData => self.tus_delete_multislot_data(data).await, CommandType::ClearPresence => self.clear_presence().await, CommandType::SetPresence => self.set_presence(data).await, + CommandType::CreateRoomGUI => self.req_create_room_gui(data, reply), + CommandType::JoinRoomGUI => self.req_join_room_gui(data, reply).await, + CommandType::LeaveRoomGUI => self.req_leave_room_gui(data, reply).await, + CommandType::GetRoomListGUI => self.req_get_room_list_gui(data, reply), + CommandType::SetRoomSearchFlagGUI => self.req_set_room_search_flag_gui(data), + CommandType::GetRoomSearchFlagGUI => self.req_get_room_search_flag_gui(data, reply), + CommandType::SetRoomInfoGUI => self.req_set_room_info_gui(data), + CommandType::GetRoomInfoGUI => self.req_get_room_info_gui(data, reply), + CommandType::QuickMatchGUI => self.req_quickmatch_gui(data, reply).await, + CommandType::SearchJoinRoomGUI => self.req_searchjoin_gui(data, reply).await, CommandType::UpdateDomainBans => self.req_admin_update_domain_bans(), CommandType::TerminateServer => self.req_admin_terminate_server(), _ => { @@ -821,17 +856,22 @@ impl Client { } // Various helpers to help with validation - pub fn get_com_and_fb<'a, T: flatbuffers::Follow<'a> + flatbuffers::Verifiable + 'a>(&mut self, data: &'a mut StreamExtractor) -> Result<(ComId, T::Inner), ErrorType> { - let com_id = self.get_com_id_with_redir(data); - let tus_req = data.get_flatbuffer::(); + pub fn get_fb<'a, T: flatbuffers::Follow<'a> + flatbuffers::Verifiable + 'a>(&mut self, data: &'a mut StreamExtractor) -> Result { + let fb_req = data.get_flatbuffer::(); - if data.error() || tus_req.is_err() { + if data.error() || fb_req.is_err() { warn!("Validation error while extracting data into {}", std::any::type_name::()); return Err(ErrorType::Malformed); } - let tus_req = tus_req.unwrap(); + let fb_req = fb_req.unwrap(); + + Ok(fb_req) + } - Ok((com_id, tus_req)) + pub fn get_com_and_fb<'a, T: flatbuffers::Follow<'a> + flatbuffers::Verifiable + 'a>(&mut self, data: &'a mut StreamExtractor) -> Result<(ComId, T::Inner), ErrorType> { + let com_id = self.get_com_id_with_redir(data); + let fb_req = self.get_fb::(data)?; + Ok((com_id, fb_req)) } pub fn validate_and_unwrap(opt: Option) -> Result { diff --git a/src/server/client/cmd_account.rs b/src/server/client/cmd_account.rs index cd04a7b..9f6945b 100644 --- a/src/server/client/cmd_account.rs +++ b/src/server/client/cmd_account.rs @@ -194,6 +194,10 @@ impl Client { } } + pub fn is_valid_username(npid: &str) -> bool { + npid.len() >= 3 && npid.len() <= 16 && npid.chars().all(|x| x.is_ascii_alphanumeric() || x == '-' || x == '_') + } + pub fn create_account(&self, data: &mut StreamExtractor) -> Result { let npid = data.get_string(false); let password = data.get_string(false); @@ -206,12 +210,12 @@ impl Client { return Err(ErrorType::Malformed); } - if npid.len() < 3 || npid.len() > 16 || !npid.chars().all(|x| x.is_ascii_alphanumeric() || x == '-' || x == '_') { + if !Client::is_valid_username(&npid) { warn!("Error validating NpId"); return Err(ErrorType::InvalidInput); } - if online_name.len() < 3 || online_name.len() > 16 || !online_name.chars().all(|x| x.is_ascii_alphabetic() || x.is_ascii_digit() || x == '-' || x == '_') { + if !Client::is_valid_username(&online_name) { warn!("Error validating Online Name"); return Err(ErrorType::InvalidInput); } @@ -233,7 +237,9 @@ impl Client { } } - match Database::new(self.get_database_connection()?).add_user(&npid, &password, &online_name, &avatar_url, &email, &check_email) { + let is_admin = self.config.read().get_admins_list().contains(&npid); + + match Database::new(self.get_database_connection()?).add_user(&npid, &password, &online_name, &avatar_url, &email, &check_email, is_admin) { Ok(token) => { info!("Successfully created account {}", &npid); if self.config.read().is_email_validated() { diff --git a/src/server/client/cmd_misc.rs b/src/server/client/cmd_misc.rs index a4f9732..e3f29f6 100644 --- a/src/server/client/cmd_misc.rs +++ b/src/server/client/cmd_misc.rs @@ -5,6 +5,16 @@ const SCE_NP_BASIC_PRESENCE_EXTENDED_STATUS_SIZE_MAX: usize = 192; const SCE_NP_BASIC_PRESENCE_COMMENT_SIZE_MAX: usize = 64; const SCE_NP_BASIC_MAX_PRESENCE_SIZE: usize = 128; +#[allow(dead_code)] +#[allow(non_camel_case_types)] +#[repr(u16)] +enum MessageMainType { + SCE_NP_BASIC_MESSAGE_MAIN_TYPE_DATA_ATTACHMENT = 0, + SCE_NP_BASIC_MESSAGE_MAIN_TYPE_GENERAL = 1, + SCE_NP_BASIC_MESSAGE_MAIN_TYPE_ADD_FRIEND = 2, + SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE = 3, +} + impl Client { pub async fn req_signaling_infos(&mut self, data: &mut StreamExtractor, reply: &mut Vec) -> Result { let npid = data.get_string(false); @@ -127,8 +137,12 @@ impl Client { return Ok(ErrorType::InvalidInput); } - // Ensure all recipients are friends(TODO: might not be necessary for all messages?) - { + // Ensure all recipients are friends for invite messages(is this necessary?) + let msg = flatbuffers::root::(message.bytes()).map_err(|e| { + warn!("MessageDetails was malformed: {}", e); + ErrorType::Malformed + })?; + if msg.mainType() == MessageMainType::SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE as u16 { let client_infos = self.shared.client_infos.read(); let client_fi = client_infos.get(&self.client_info.user_id).unwrap().friend_info.read(); if !client_fi.friends.keys().copied().collect::>().is_superset(&ids) { diff --git a/src/server/client/cmd_room.rs b/src/server/client/cmd_room.rs index bcb8285..e07c426 100644 --- a/src/server/client/cmd_room.rs +++ b/src/server/client/cmd_room.rs @@ -76,10 +76,10 @@ impl Client { Ok(ErrorType::NoError) } - pub async fn leave_room(&self, room_manager: &Arc>, com_id: &ComId, room_id: u64, opt_data: Option<&PresenceOptionData<'_>>, event_cause: EventCause) -> ErrorType { + pub async fn leave_room(&self, com_id: &ComId, room_id: u64, opt_data: Option<&PresenceOptionData<'_>>, event_cause: EventCause) -> ErrorType { let (destroyed, users, user_data); { - let mut room_manager = room_manager.write(); + let mut room_manager = self.shared.room_manager.write(); if !room_manager.room_exists(com_id, room_id) { return ErrorType::NotFound; } @@ -139,9 +139,7 @@ impl Client { pub async fn req_leave_room(&mut self, data: &mut StreamExtractor, reply: &mut Vec) -> Result { let (com_id, leave_req) = self.get_com_and_fb::(data)?; - let res = self - .leave_room(&self.shared.room_manager, &com_id, leave_req.roomId(), Some(&leave_req.optData().unwrap()), EventCause::LeaveAction) - .await; + let res = self.leave_room(&com_id, leave_req.roomId(), Some(&leave_req.optData().unwrap()), EventCause::LeaveAction).await; reply.extend(&leave_req.roomId().to_le_bytes()); Ok(res) } @@ -315,9 +313,9 @@ impl Client { avatar_url = Some(builder.create_string(&self.client_info.avatar_url)); } - let src_user_info = UserInfo2::create( + let src_user_info = UserInfo::create( &mut builder, - &UserInfo2Args { + &UserInfoArgs { npId: npid, onlineName: online_name, avatarUrl: avatar_url, diff --git a/src/server/client/cmd_room_gui.rs b/src/server/client/cmd_room_gui.rs new file mode 100644 index 0000000..aae343e --- /dev/null +++ b/src/server/client/cmd_room_gui.rs @@ -0,0 +1,149 @@ +// Room Commands for old GUI api + +use crate::server::{client::*, gui_room_manager::GuiRoomId}; + +impl Client { + pub fn req_create_room_gui(&mut self, data: &mut StreamExtractor, reply: &mut Vec) -> Result { + let (com_id, create_req) = self.get_com_and_fb::(data)?; + + let resp = self.shared.gui_room_manager.write().create_room_gui(&com_id, &create_req, &self.client_info); + Client::add_data_packet(reply, &resp); + Ok(ErrorType::NoError) + } + + pub async fn req_join_room_gui(&mut self, data: &mut StreamExtractor, reply: &mut Vec) -> Result { + let join_req = self.get_fb::(data)?; + + let room_id = GuiRoomManager::fb_vec_to_room_id(join_req.id())?; + let res = self.shared.gui_room_manager.write().join_room_gui(&room_id, &self.client_info); + match res { + Ok((resp, notif_users, notif_data)) => { + let mut n_msg: Vec = Vec::with_capacity(notif_data.len() + size_of::()); + Client::add_data_packet(&mut n_msg, ¬if_data); + let notif = Client::create_notification(NotificationType::MemberJoinedRoomGUI, &n_msg); + self.send_notification(¬if, ¬if_users).await; + + Client::add_data_packet(reply, &resp); + Ok(ErrorType::NoError) + } + Err(e) => Ok(e), + } + } + + pub async fn leave_room_gui(&mut self, room_id: &GuiRoomId) -> Result, ErrorType> { + let (resp, notif_ids, notifs) = self.shared.gui_room_manager.write().leave_room_gui(room_id, &self.client_info)?; + + for (notif_type, notif_data) in ¬ifs { + let mut n_msg: Vec = Vec::with_capacity(notif_data.len() + size_of::()); + Client::add_data_packet(&mut n_msg, ¬if_data); + let notif_vec = Client::create_notification(*notif_type, &n_msg); + self.send_notification(¬if_vec, ¬if_ids).await; + } + + Ok(resp) + } + + pub async fn req_leave_room_gui(&mut self, data: &mut StreamExtractor, reply: &mut Vec) -> Result { + let leave_req = self.get_fb::(data)?; + let room_id = GuiRoomManager::fb_vec_to_room_id(leave_req.id())?; + + match self.leave_room_gui(&room_id).await { + Ok(data) => Client::add_data_packet(reply, &data), + Err(e) => return Ok(e), + } + + Ok(ErrorType::NoError) + } + + pub fn req_get_room_list_gui(&mut self, data: &mut StreamExtractor, reply: &mut Vec) -> Result { + let (com_id, search_req) = self.get_com_and_fb::(data)?; + + let resp = self.shared.gui_room_manager.read().get_room_list_gui(&com_id, &search_req); + Client::add_data_packet(reply, &resp); + Ok(ErrorType::NoError) + } + + pub fn req_set_room_search_flag_gui(&mut self, data: &mut StreamExtractor) -> Result { + let set_req = self.get_fb::(data)?; + let room_id = GuiRoomManager::fb_vec_to_room_id(set_req.roomid())?; + let stealth = set_req.stealth(); + + match self.shared.gui_room_manager.write().set_search_flag(&room_id, stealth, self.client_info.user_id) { + Ok(()) => Ok(ErrorType::NoError), + Err(e) => Ok(e), + } + } + + pub fn req_get_room_search_flag_gui(&mut self, data: &mut StreamExtractor, reply: &mut Vec) -> Result { + let get_req = self.get_fb::(data)?; + let room_id = GuiRoomManager::fb_vec_to_room_id(get_req.id())?; + + match self.shared.gui_room_manager.read().get_search_flag(&room_id) { + Ok(resp) => { + Client::add_data_packet(reply, &resp); + Ok(ErrorType::NoError) + } + Err(e) => Ok(e), + } + } + + pub fn req_set_room_info_gui(&mut self, data: &mut StreamExtractor) -> Result { + let set_req = self.get_fb::(data)?; + let room_id = GuiRoomManager::fb_vec_to_room_id(set_req.id())?; + let attrs = Client::validate_and_unwrap(set_req.attr())?; + + match self.shared.gui_room_manager.write().set_room_info_gui(&room_id, attrs, self.client_info.user_id) { + Ok(()) => Ok(ErrorType::NoError), + Err(e) => Ok(e), + } + } + + pub fn req_get_room_info_gui(&mut self, data: &mut StreamExtractor, reply: &mut Vec) -> Result { + let get_req = self.get_fb::(data)?; + let room_id = GuiRoomManager::fb_vec_to_room_id(get_req.id())?; + let attrs = Client::validate_and_unwrap(get_req.attr())?; + + match self.shared.gui_room_manager.read().get_room_info_gui(&room_id, attrs) { + Ok(resp) => { + Client::add_data_packet(reply, &resp); + Ok(ErrorType::NoError) + } + Err(e) => Ok(e), + } + } + + pub async fn req_quickmatch_gui(&mut self, data: &mut StreamExtractor, reply: &mut Vec) -> Result { + let (com_id, qm_req) = self.get_com_and_fb::(data)?; + + let (resp, notif) = self.shared.gui_room_manager.write().quickmatch_gui(&com_id, &qm_req, &self.client_info); + + if let Some((client_ids, notification)) = notif { + let mut n_msg: Vec = Vec::with_capacity(notification.len() + size_of::()); + Client::add_data_packet(&mut n_msg, ¬ification); + let notif_vec = Client::create_notification(NotificationType::QuickMatchCompleteGUI, &n_msg); + self.send_notification(¬if_vec, &client_ids).await; + self.self_notification(¬if_vec); + } + + Client::add_data_packet(reply, &resp); + Ok(ErrorType::NoError) + } + + pub async fn req_searchjoin_gui(&mut self, data: &mut StreamExtractor, reply: &mut Vec) -> Result { + let (com_id, sj_req) = self.get_com_and_fb::(data)?; + + let res = self.shared.gui_room_manager.write().search_join_gui(&com_id, &sj_req, &self.client_info); + match res { + Ok((resp, notif_users, notif_data)) => { + let mut n_msg: Vec = Vec::with_capacity(notif_data.len() + size_of::()); + Client::add_data_packet(&mut n_msg, ¬if_data); + let notif = Client::create_notification(NotificationType::MemberJoinedRoomGUI, &n_msg); + self.send_notification(¬if, ¬if_users).await; + + Client::add_data_packet(reply, &resp); + Ok(ErrorType::NoError) + } + Err(e) => Ok(e), + } + } +} diff --git a/src/server/client/notifications.rs b/src/server/client/notifications.rs index 4f6ef62..c4382af 100644 --- a/src/server/client/notifications.rs +++ b/src/server/client/notifications.rs @@ -1,5 +1,6 @@ use crate::server::client::*; +#[derive(Clone, Copy)] #[repr(u16)] pub enum NotificationType { UserJoinedRoom, @@ -17,6 +18,12 @@ pub enum NotificationType { MessageReceived, FriendPresenceChanged, SignalingInfo, + MemberJoinedRoomGUI, + MemberLeftRoomGUI, + RoomDisappearedGUI, + RoomOwnerChangedGUI, + _UserKickedGUI, + QuickMatchCompleteGUI, } impl Client { diff --git a/src/server/client/ticket.rs b/src/server/client/ticket.rs index c7655f3..e3e14b7 100644 --- a/src/server/client/ticket.rs +++ b/src/server/client/ticket.rs @@ -121,7 +121,9 @@ impl Ticket { let mut serial_vec = serial_str.as_bytes().to_vec(); serial_vec.resize(0x14, 0); - let issuer_id: u32 = 0x33333333; + // used to be 0x33333333 but some games actually check this value(Tony Hawk: SHRED) + // 0x100 is supposed to be the release network, other known values are 8 and 1(test and dev networks?) + let issuer_id: u32 = 0x100; let issued_date: u64 = (SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_millis() as u64) - (60 * 1000); let expire_date = issued_date + (60 * 1000 * 15); diff --git a/src/server/database.rs b/src/server/database.rs index 883f993..7cd84c7 100644 --- a/src/server/database.rs +++ b/src/server/database.rs @@ -100,7 +100,7 @@ struct MigrationData { static DATABASE_PATH: &str = "db/rpcn.db"; -static DATABASE_MIGRATIONS: [MigrationData; 5] = [ +static DATABASE_MIGRATIONS: [MigrationData; 8] = [ MigrationData { version: 1, text: "Initial setup", @@ -126,6 +126,21 @@ static DATABASE_MIGRATIONS: [MigrationData; 5] = [ text: "Adding indexes to tables", function: add_indexes, }, + MigrationData { + version: 6, + text: "Updating communication_id entries to show subid", + function: update_communication_ids, + }, + MigrationData { + version: 7, + text: "Change score rank limit's default", + function: change_score_rank_limit_default, + }, + MigrationData { + version: 8, + text: "Fixup for RR7", + function: ridge_racer_7_bugfix, + }, ]; fn initial_setup(conn: &r2d2::PooledConnection) -> Result<(), String> { @@ -278,8 +293,61 @@ fn add_indexes(conn: &r2d2::PooledConnection) -> Result<(), String> { + conn.pragma_update(None, "foreign_keys", false) + .map_err(|e| format!("Failed to disable foreign_keys constraint: {}", e))?; + + let table_list = ["server", "world", "lobby", "score_table", "tus_var", "tus_data", "tus_var_vuser", "tus_data_vuser", "score"]; + + for table in &table_list { + let query = format!("UPDATE {} SET communication_id = communication_id || '_00'", table); + conn.execute(&query, []).map_err(|e| format!("Error updating communication_id for table {}: {}", table, e))?; + } + + conn.pragma_update(None, "foreign_keys", true).map_err(|e| format!("Failed to enable foreign_keys constraint: {}", e))?; + Ok(()) +} + +fn change_score_rank_limit_default(conn: &r2d2::PooledConnection) -> Result<(), String> { + conn.execute("UPDATE score_table SET rank_limit = 250", []) + .map_err(|e| format!("Failed to update score rank_limit default: {}", e))?; + Ok(()) +} + +fn ridge_racer_7_bugfix(conn: &r2d2::PooledConnection) -> Result<(), String> { + for table_id in 0..=1 { + let res = conn.execute( + "INSERT INTO score_table ( communication_id, board_id, rank_limit, update_mode, sort_mode, upload_num_limit, upload_size_limit ) VALUES ( ?1, ?2, ?3, ?4, ?5, ?6, ?7 ) ON CONFLICT( communication_id, board_id ) DO UPDATE SET rank_limit = excluded.rank_limit, update_mode = excluded.update_mode, sort_mode = excluded.sort_mode, upload_num_limit = excluded.upload_num_limit, upload_size_limit = excluded.upload_size_limit", + rusqlite::params![ + "NPWR00001_01", + table_id, + 250, + 0, + 0, + 10, + 6000000, + ], + ); + + if let Err(e) = res { + return Err(format!("Unexpected error creating/updating RR7 score table {}: {}", table_id, e)); + } + + let res = conn.execute( + "UPDATE score SET communication_id = ?1 WHERE communication_id = ?2 AND board_id = ?3 AND score > 60000000000000000", + rusqlite::params!["NPWR00001_01", "NPWR00001_00", table_id,], + ); + + if let Err(e) = res { + return Err(format!("Unexpected error updating RR7 scores: {}", e)); + } + } + + Ok(()) +} + impl Server { - pub fn initialize_database() -> Result, String> { + pub fn initialize_database(admin_list: &Vec) -> Result, String> { match fs::create_dir("db") { Ok(_) => {} Err(e) => match e.kind() { @@ -351,7 +419,7 @@ impl Server { } let servers_infos: Vec<&str> = l.trim().split('|').map(|v| v.trim()).collect(); - if servers_infos.len() != 4 || servers_infos[0].len() != 9 { + if servers_infos.len() != 4 || servers_infos[0].len() != COMMUNICATION_ID_SIZE { println!("servers.cfg: line({}) was considered invalid and was skipped", l); return None; } @@ -391,6 +459,12 @@ impl Server { }, } + // Set admin rights from config + if !admin_list.is_empty() { + let set_admin_cmd = format!("UPDATE account SET admin = TRUE WHERE username IN ({})", "'".to_string() + &admin_list.join("','") + "'"); + let _ = conn.execute(&set_admin_cmd, []); + } + Ok(pool) } @@ -472,20 +546,19 @@ impl Database { Database { conn } } - pub fn add_user(&self, username: &str, password: &str, online_name: &str, avatar_url: &str, email: &str, email_check: &str) -> Result { + pub fn add_user(&self, username: &str, password: &str, online_name: &str, avatar_url: &str, email: &str, email_check: &str, is_admin: bool) -> Result { let mut rng_gen = StdRng::from_entropy(); let (hash, salt) = hash_password(&mut rng_gen, password); let salt_slice = &salt[..]; let token_str = generate_token(&mut rng_gen); - let admin = false; let stat_agent = false; let banned = false; if let Err(e) = self.conn.execute( "INSERT INTO account ( username, hash, salt, online_name, avatar_url, email, email_check, token, admin, stat_agent, banned ) VALUES ( ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11 )", - rusqlite::params![username, hash, salt_slice, online_name, avatar_url, email, email_check, token_str, admin, stat_agent, banned], + rusqlite::params![username, hash, salt_slice, online_name, avatar_url, email, email_check, token_str, is_admin, stat_agent, banned], ) { if let rusqlite::Error::SqliteFailure(error, ref msg) = e { if error.code == rusqlite::ErrorCode::ConstraintViolation { diff --git a/src/server/gui_room_manager.rs b/src/server/gui_room_manager.rs new file mode 100644 index 0000000..f5adfd7 --- /dev/null +++ b/src/server/gui_room_manager.rs @@ -0,0 +1,779 @@ +#![allow(non_snake_case)] +#![allow(dead_code)] +#![allow(non_camel_case_types)] + +use std::collections::{HashMap, HashSet}; + +use rand::Rng; +use tracing::{error, warn}; + +use crate::server::client::notifications::NotificationType; +use crate::server::client::{com_id_to_string, ClientInfo, ComId, ErrorType}; +use crate::server::stream_extractor::np2_structs_generated::*; + +// We store room id as communication_id + room number as hexadecimal (12 + 16) +pub const GUI_ROOM_ID_SIZE: usize = 28; +pub type GuiRoomId = [u8; GUI_ROOM_ID_SIZE]; +pub type GuiRoomNumAttr = u32; + +const _SCE_NP_MATCHING_ATTR_TYPE_BASIC_BIN: u32 = 1; +const SCE_NP_MATCHING_ATTR_TYPE_BASIC_NUM: u32 = 2; +const SCE_NP_MATCHING_ATTR_TYPE_GAME_BIN: u32 = 3; +const SCE_NP_MATCHING_ATTR_TYPE_GAME_NUM: u32 = 4; + +const SCE_NP_MATCHING_ROOM_ATTR_ID_TOTAL_SLOT: u32 = 1; +const SCE_NP_MATCHING_ROOM_ATTR_ID_PRIVATE_SLOT: u32 = 2; +const SCE_NP_MATCHING_ROOM_ATTR_ID_CUR_TOTAL_NUM: u32 = 3; +const SCE_NP_MATCHING_ROOM_ATTR_ID_CUR_PUBLIC_NUM: u32 = 4; +const SCE_NP_MATCHING_ROOM_ATTR_ID_CUR_PRIVATE_NUM: u32 = 5; +const SCE_NP_MATCHING_ROOM_ATTR_ID_PRIVILEGE_TYPE: u32 = 6; +const SCE_NP_MATCHING_ROOM_ATTR_ID_ROOM_SEARCH_FLAG: u32 = 7; + +const SCE_NP_MATCHING_CONDITION_SEARCH_EQ: u32 = 0; +const SCE_NP_MATCHING_CONDITION_SEARCH_NE: u32 = 1; +const SCE_NP_MATCHING_CONDITION_SEARCH_LT: u32 = 2; +const SCE_NP_MATCHING_CONDITION_SEARCH_LE: u32 = 3; +const SCE_NP_MATCHING_CONDITION_SEARCH_GT: u32 = 4; +const SCE_NP_MATCHING_CONDITION_SEARCH_GE: u32 = 5; + +#[derive(Clone, Copy)] +pub struct GuiRoomBinAttr { + data: [u8; N], + cur_size: usize, +} + +impl GuiRoomBinAttr { + fn default() -> GuiRoomBinAttr { + GuiRoomBinAttr { data: [0; N], cur_size: 0 } + } + + fn from_flatbuffer(fb: &MatchingAttr) -> GuiRoomBinAttr { + let mut cur_size = 0; + let mut data = [0; N]; + + if let Some(bin_data) = fb.data() { + if bin_data.len() > N { + error!("BinAttr size > capacity: {} vs {}", bin_data.len(), N); + } + + cur_size = std::cmp::min(bin_data.len(), N); + for i in 0..cur_size { + data[i] = bin_data.get(i); + } + } + + GuiRoomBinAttr { data, cur_size } + } + + fn gen_MatchingAttr<'a>(&self, builder: &mut flatbuffers::FlatBufferBuilder<'a>, attr_id: u32) -> flatbuffers::WIPOffset> { + let data = Some(builder.create_vector(&self.data[0..self.cur_size])); + + MatchingAttr::create( + builder, + &MatchingAttrArgs { + attr_type: SCE_NP_MATCHING_ATTR_TYPE_GAME_BIN, + attr_id, + num: 0, + data, + }, + ) + } +} + +pub struct GuiRoomMember { + npid: String, + online_name: String, + avatar_url: String, + owner: bool, +} + +impl GuiRoomMember { + fn from_clientinfo(cinfo: &ClientInfo, owner: bool) -> GuiRoomMember { + GuiRoomMember { + npid: cinfo.npid.clone(), + online_name: cinfo.online_name.clone(), + avatar_url: cinfo.avatar_url.clone(), + owner, + } + } + + fn to_flatbuffer<'a>(&self, builder: &mut flatbuffers::FlatBufferBuilder<'a>) -> flatbuffers::WIPOffset> { + let npid = builder.create_string(&self.npid); + let online_name = builder.create_string(&self.online_name); + let avatar_url = builder.create_string(&self.avatar_url); + + let user_info = UserInfo::create( + builder, + &UserInfoArgs { + npId: Some(npid), + onlineName: Some(online_name), + avatarUrl: Some(avatar_url), + }, + ); + + GUIUserInfo::create( + builder, + &GUIUserInfoArgs { + info: Some(user_info), + owner: self.owner, + }, + ) + } +} + +pub struct GuiRoom { + total_slots: u32, + private_slots: u32, + privilege_grant: bool, + stealth: bool, + members: HashMap, + num_attrs: [GuiRoomNumAttr; 16], + big_bin_attrs: [GuiRoomBinAttr<256>; 2], + small_bin_attrs: [GuiRoomBinAttr<64>; 14], + communication_id: ComId, + quickmatch_room: bool, +} + +impl GuiRoom { + fn from_flatbuffer(fb: &CreateRoomGUIRequest, com_id: &ComId) -> GuiRoom { + let total_slots = std::cmp::min(fb.total_slots(), 64); + let private_slots = std::cmp::min(std::cmp::min(fb.private_slots(), 64), total_slots); + + let mut room = GuiRoom { + total_slots, + private_slots, + privilege_grant: fb.privilege_grant(), + stealth: fb.stealth(), + members: HashMap::new(), + num_attrs: [0; 16], + big_bin_attrs: [GuiRoomBinAttr::<256>::default(); 2], + small_bin_attrs: [GuiRoomBinAttr::<64>::default(); 14], + communication_id: *com_id, + quickmatch_room: false, + }; + + if let Some(game_attrs) = fb.game_attrs() { + for attr in game_attrs { + room.set_attr(&attr); + } + } + + room + } + + fn from_quickmatch_flatbuffer(fb: &QuickMatchGUIRequest, com_id: &ComId) -> GuiRoom { + let total_slots = std::cmp::min(fb.available_num(), 64); + + let mut room = GuiRoom { + total_slots, + private_slots: 0, + privilege_grant: true, + stealth: false, + members: HashMap::new(), + num_attrs: [0; 16], + big_bin_attrs: [GuiRoomBinAttr::<256>::default(); 2], + small_bin_attrs: [GuiRoomBinAttr::<64>::default(); 14], + communication_id: *com_id, + quickmatch_room: true, + }; + + if let Some(conds) = fb.conds() { + for cond in conds { + match cond.attr_type() { + SCE_NP_MATCHING_ATTR_TYPE_GAME_NUM => match cond.attr_id() { + 1..=16 => { + if cond.comp_op() == SCE_NP_MATCHING_CONDITION_SEARCH_EQ { + room.num_attrs[(cond.attr_id() - 1) as usize] = cond.comp_value() + } else { + warn!("Encountered a != condition in QM, id: {}, op: {}, val: {}", cond.attr_id(), cond.comp_op(), cond.comp_value()); + } + } + id => error!("Unexpected QM game num id: {}", id), + }, + v => error!("Unexpected QM Cond type: {}", v), + } + } + } + + room + } + + fn set_attr(&mut self, attr: &MatchingAttr) { + match attr.attr_type() { + SCE_NP_MATCHING_ATTR_TYPE_GAME_BIN => match attr.attr_id() { + 1 | 2 => self.big_bin_attrs[(attr.attr_id() - 1) as usize] = GuiRoomBinAttr::<256>::from_flatbuffer(attr), + 3..=16 => self.small_bin_attrs[(attr.attr_id() - 3) as usize] = GuiRoomBinAttr::<64>::from_flatbuffer(attr), + id => error!("Unexpected game bin id: {}", id), + }, + SCE_NP_MATCHING_ATTR_TYPE_GAME_NUM => match attr.attr_id() { + 1..=16 => self.num_attrs[(attr.attr_id() - 1) as usize] = attr.num(), + id => error!("Unexpected game num id: {}", id), + }, + v => error!("Unexpected MatchingAttr type: {}", v), + } + } + + fn add_member(&mut self, cinfo: &ClientInfo, owner: bool) { + self.members.insert(cinfo.user_id, GuiRoomMember::from_clientinfo(cinfo, owner)); + } + + fn gen_MatchingRoomStatus<'a>( + &self, + builder: &mut flatbuffers::FlatBufferBuilder<'a>, + id: &GuiRoomId, + member_filter: Option, + extra_member: Option<&GuiRoomMember>, + ) -> flatbuffers::WIPOffset> { + let vec_id = builder.create_vector(id); + + let mut tmp_vec_members = Vec::new(); + + if let Some(user_id) = member_filter { + if user_id != 0 { + if let Some(member) = self.members.get(&user_id) { + tmp_vec_members.push(member.to_flatbuffer(builder)); + } + } + } else { + for member in self.members.values() { + tmp_vec_members.push(member.to_flatbuffer(builder)); + } + } + + if let Some(extra_member) = extra_member { + tmp_vec_members.push(extra_member.to_flatbuffer(builder)); + } + + let vec_members = builder.create_vector(&tmp_vec_members); + + let mut rbuild = MatchingRoomStatusBuilder::new(builder); + rbuild.add_id(vec_id); + rbuild.add_members(vec_members); + rbuild.finish() + } + + fn gen_MatchingAttr<'a>(&self, builder: &mut flatbuffers::FlatBufferBuilder<'a>, attr_type: u32, attr_id: u32) -> Option>> { + match attr_type { + SCE_NP_MATCHING_ATTR_TYPE_BASIC_NUM => { + let num = match attr_id { + SCE_NP_MATCHING_ROOM_ATTR_ID_TOTAL_SLOT => self.total_slots, + SCE_NP_MATCHING_ROOM_ATTR_ID_PRIVATE_SLOT => self.private_slots, + SCE_NP_MATCHING_ROOM_ATTR_ID_CUR_TOTAL_NUM => self.members.len() as u32, + SCE_NP_MATCHING_ROOM_ATTR_ID_CUR_PUBLIC_NUM => self.members.len() as u32, + SCE_NP_MATCHING_ROOM_ATTR_ID_CUR_PRIVATE_NUM => 0, // TODO? + SCE_NP_MATCHING_ROOM_ATTR_ID_PRIVILEGE_TYPE => { + if self.privilege_grant { + 1 + } else { + 0 + } + } + SCE_NP_MATCHING_ROOM_ATTR_ID_ROOM_SEARCH_FLAG => { + if self.stealth { + 1 + } else { + 0 + } + } + _ => return None, + }; + + Some(MatchingAttr::create(builder, &MatchingAttrArgs { attr_type, attr_id, num, data: None })) + } + SCE_NP_MATCHING_ATTR_TYPE_GAME_BIN => match attr_id { + 1 | 2 => Some(self.big_bin_attrs[(attr_id - 1) as usize].gen_MatchingAttr(builder, attr_id)), + 3..=16 => Some(self.small_bin_attrs[(attr_id - 3) as usize].gen_MatchingAttr(builder, attr_id)), + _ => None, + }, + SCE_NP_MATCHING_ATTR_TYPE_GAME_NUM => { + if attr_id == 0 || attr_id > 16 { + return None; + } + + let num = self.num_attrs[(attr_id - 1) as usize]; + Some(MatchingAttr::create(builder, &MatchingAttrArgs { attr_type, attr_id, num, data: None })) + } + _ => None, + } + } + + fn gen_MatchingSearchJoinRoomInfo<'a>( + &self, + builder: &mut flatbuffers::FlatBufferBuilder<'a>, + id: &GuiRoomId, + member_filter: Option, + extra_member: Option<&GuiRoomMember>, + attrs: Option>>, + ) -> flatbuffers::WIPOffset> { + let room_status = self.gen_MatchingRoomStatus(builder, id, member_filter, extra_member); + + let inc_attrs = if let Some(attr_ids) = attrs { attr_ids.iter().collect() } else { Vec::new() }; + let parsed_attrs: Vec<(u32, u32)> = inc_attrs.iter().map(|attr| (attr.attr_type(), attr.attr_id())).collect(); + + let mut tmp_vec_attrs = Vec::new(); + for attr in parsed_attrs { + if let Some(res_attr) = self.gen_MatchingAttr(builder, attr.0, attr.1) { + tmp_vec_attrs.push(res_attr); + } + } + + let vec_attrs = builder.create_vector(&tmp_vec_attrs); + + let mut rbuild = MatchingSearchJoinRoomInfoBuilder::new(builder); + rbuild.add_room(room_status); + rbuild.add_attr(vec_attrs); + rbuild.finish() + } + + fn gen_MatchingRoom<'a>(&self, builder: &mut flatbuffers::FlatBufferBuilder<'a>, id: &GuiRoomId, attrs: &Vec<(u32, u32)>) -> flatbuffers::WIPOffset> { + let vec_id = builder.create_vector(id); + + let mut tmp_vec_attrs = Vec::new(); + for attr in attrs { + if let Some(res_attr) = self.gen_MatchingAttr(builder, attr.0, attr.1) { + tmp_vec_attrs.push(res_attr); + } + } + + let vec_attrs = builder.create_vector(&tmp_vec_attrs); + + let mut rbuild = MatchingRoomBuilder::new(builder); + rbuild.add_id(vec_id); + rbuild.add_attr(vec_attrs); + rbuild.finish() + } + + fn match_value(value: u32, cmp_value: u32, cmp_op: u32) -> bool { + match cmp_op { + SCE_NP_MATCHING_CONDITION_SEARCH_EQ => value == cmp_value, + SCE_NP_MATCHING_CONDITION_SEARCH_NE => value != cmp_value, + SCE_NP_MATCHING_CONDITION_SEARCH_LT => value < cmp_value, + SCE_NP_MATCHING_CONDITION_SEARCH_LE => value <= cmp_value, + SCE_NP_MATCHING_CONDITION_SEARCH_GT => value > cmp_value, + SCE_NP_MATCHING_CONDITION_SEARCH_GE => value >= cmp_value, + _ => false, + } + } + + fn is_match(&self, conds: &Option>>>, check_full: bool) -> bool { + if self.quickmatch_room || self.stealth { + return false; + } + + if check_full && self.members.len() == self.total_slots as usize { + return false; + } + + if let Some(conds) = conds { + 'cond_loop: for cond in conds { + match cond.attr_type() { + SCE_NP_MATCHING_ATTR_TYPE_BASIC_NUM => { + if cond.attr_id() != 1 { + error!("Invalid id for SCE_NP_MATCHING_ATTR_TYPE_BASIC_NUM for GetRoomListGUI request: {}", cond.attr_id()); + continue 'cond_loop; + } + + if !GuiRoom::match_value(self.total_slots, cond.comp_value(), cond.comp_op()) { + return false; + } + } + SCE_NP_MATCHING_ATTR_TYPE_GAME_NUM => { + if cond.attr_id() == 0 || cond.attr_id() > 8 { + error!("Invalid id for SCE_NP_MATCHING_ATTR_TYPE_GAME_NUM for GetRoomListGUI request: {}", cond.attr_id()); + continue 'cond_loop; + } + + if !GuiRoom::match_value(self.num_attrs[(cond.attr_id() - 1) as usize], cond.comp_value(), cond.comp_op()) { + return false; + } + } + v => { + error!("Invalid type in the cond for GetRoomListGUI request: {}", v); + continue 'cond_loop; + } + } + } + } + + true + } + + fn is_quickmatch(&self, req: &QuickMatchGUIRequest) -> bool { + if !self.quickmatch_room || self.stealth || self.total_slots != req.available_num() { + return false; + } + + if let Some(conds) = req.conds() { + 'cond_loop: for cond in &conds { + if cond.attr_type() != SCE_NP_MATCHING_ATTR_TYPE_GAME_NUM + || cond.attr_id() == 0 + || cond.attr_id() > 8 + || (cond.comp_op() != SCE_NP_MATCHING_CONDITION_SEARCH_EQ && cond.comp_op() != SCE_NP_MATCHING_CONDITION_SEARCH_NE) + { + error!("Invalid cond in quickmatch: {}:{}", cond.attr_type(), cond.attr_id()); + continue 'cond_loop; + } + + if !GuiRoom::match_value(self.num_attrs[(cond.attr_id() - 1) as usize], cond.comp_value(), cond.comp_op()) { + return false; + } + } + } + + true + } +} + +pub struct GuiRoomManager { + cur_room_id: u64, + rooms: HashMap, + comid_rooms: HashMap>, + user_rooms: HashMap>, +} + +impl<'a> GuiRoomManager { + pub fn new() -> GuiRoomManager { + GuiRoomManager { + cur_room_id: 1, + rooms: HashMap::new(), + comid_rooms: HashMap::new(), + user_rooms: HashMap::new(), + } + } + + pub fn fb_vec_to_room_id(fb_vec: Option>) -> Result { + if let Some(fb_vec) = fb_vec { + if fb_vec.len() == GUI_ROOM_ID_SIZE { + return Ok(fb_vec.iter().collect::>().try_into().unwrap()); + } + } + + Err(ErrorType::Malformed) + } + + fn generate_room_id(cur_room_id: &mut u64, com_id: &ComId) -> GuiRoomId { + let room_id: GuiRoomId = format!("{}{:016X}", com_id_to_string(com_id), cur_room_id).bytes().collect::>().try_into().unwrap(); + *cur_room_id += 1; + room_id + } + + fn insert_room(rooms: &'a mut HashMap, comid_rooms: &mut HashMap>, com_id: &ComId, room_id: &GuiRoomId, room: GuiRoom) -> &'a mut GuiRoom { + rooms.insert(*room_id, room); + comid_rooms.entry(*com_id).or_default().insert(*room_id); + rooms.get_mut(room_id).unwrap() + } + + fn add_member_to_room(user_rooms: &mut HashMap>, room_id: &GuiRoomId, cinfo: &ClientInfo, owner: bool, room: &mut GuiRoom) { + room.add_member(cinfo, owner); + assert!(user_rooms.entry(cinfo.user_id).or_default().insert(*room_id)); + } + + pub fn quickmatch_gui(&mut self, com_id: &ComId, req: &QuickMatchGUIRequest, cinfo: &ClientInfo) -> (Vec, Option<(HashSet, Vec)>) { + let list = self.comid_rooms.get(com_id); + + let found_room = list.and_then(|list| { + list.iter().find(|room_id| { + let room = self.rooms.get(*room_id).unwrap(); + room.is_quickmatch(req) + }) + }); + + let (room_id, room) = { + if let Some(found_room) = found_room { + let room = self.rooms.get_mut(found_room).unwrap(); + GuiRoomManager::add_member_to_room(&mut self.user_rooms, found_room, cinfo, false, room); + (*found_room, room) + } else { + let room_id = GuiRoomManager::generate_room_id(&mut self.cur_room_id, com_id); + let room = GuiRoomManager::insert_room(&mut self.rooms, &mut self.comid_rooms, com_id, &room_id, GuiRoom::from_quickmatch_flatbuffer(req, com_id)); + GuiRoomManager::add_member_to_room(&mut self.user_rooms, &room_id, cinfo, true, room); + (room_id, room) + } + }; + + let notification_infos = if room.members.len() == room.total_slots as usize { + // room is complete, notify members that it is + room.stealth = true; + // room.privilege_grant = false; + let member_ids: HashSet = room.members.keys().filter_map(|user_id| if *user_id != cinfo.user_id { Some(*user_id) } else { None }).collect(); + let mut notif_builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let status = room.gen_MatchingRoomStatus(&mut notif_builder, &room_id, None, None); + notif_builder.finish(status, None); + Some((member_ids, notif_builder.finished_data().to_vec())) + } else { + None + }; + + let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let vec_id = builder.create_vector(&room_id); + let mut rbuild = MatchingGuiRoomIdBuilder::new(&mut builder); + rbuild.add_id(vec_id); + let fb_room_id = rbuild.finish(); + builder.finish(fb_room_id, None); + (builder.finished_data().to_vec(), notification_infos) + } + + pub fn create_room_gui(&mut self, com_id: &ComId, req: &CreateRoomGUIRequest, cinfo: &ClientInfo) -> Vec { + let room_id = GuiRoomManager::generate_room_id(&mut self.cur_room_id, com_id); + + let room = GuiRoomManager::insert_room(&mut self.rooms, &mut self.comid_rooms, com_id, &room_id, GuiRoom::from_flatbuffer(req, com_id)); + GuiRoomManager::add_member_to_room(&mut self.user_rooms, &room_id, cinfo, true, room); + + let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let room_data = room.gen_MatchingRoomStatus(&mut builder, &room_id, None, None); + builder.finish(room_data, None); + builder.finished_data().to_vec() + } + + pub fn join_room_gui(&mut self, room_id: &GuiRoomId, cinfo: &ClientInfo) -> Result<(Vec, HashSet, Vec), ErrorType> { + let room = self.rooms.get_mut(room_id).ok_or(ErrorType::NotFound)?; + + if room.members.len() == room.total_slots as usize { + return Err(ErrorType::RoomFull); + } + + if room.members.contains_key(&cinfo.user_id) { + return Err(ErrorType::RoomAlreadyJoined); + } + + let member_ids: HashSet = room.members.keys().copied().collect(); + GuiRoomManager::add_member_to_room(&mut self.user_rooms, room_id, cinfo, false, room); + + let reply = { + let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let room_data = room.gen_MatchingRoomStatus(&mut builder, room_id, None, None); + builder.finish(room_data, None); + builder.finished_data().to_vec() + }; + + let notif = { + let mut notif_builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let notif_status = room.gen_MatchingRoomStatus(&mut notif_builder, room_id, Some(cinfo.user_id), None); + notif_builder.finish(notif_status, None); + notif_builder.finished_data().to_vec() + }; + + Ok((reply, member_ids, notif)) + } + + pub fn leave_room_gui(&mut self, room_id: &GuiRoomId, cinfo: &ClientInfo) -> Result<(Vec, HashSet, Vec<(NotificationType, Vec)>), ErrorType> { + let room = self.rooms.get_mut(room_id).ok_or(ErrorType::NotFound)?; + + let member_left = room.members.remove(&cinfo.user_id); + if member_left.is_none() { + return Err(ErrorType::NotFound); // Should this return a different error? + } + let mut member_left = member_left.unwrap(); + + self.user_rooms.get_mut(&cinfo.user_id).unwrap().remove(room_id); + + let set_user_ids = room.members.keys().copied().collect(); + let mut notifications = Vec::new(); + + let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let reply_status = room.gen_MatchingRoomStatus(&mut builder, room_id, Some(0), None); + builder.finish(reply_status, None); + let reply = builder.finished_data().to_vec(); + + if room.members.is_empty() { + assert!(self.comid_rooms.get_mut(&room.communication_id).unwrap().remove(room_id)); + assert!(self.rooms.remove(room_id).is_some()); + return Ok((reply, HashSet::new(), Vec::new())); + } + + if member_left.owner { + member_left.owner = false; + + if !room.privilege_grant { + for user_id in &set_user_ids { + self.user_rooms.get_mut(user_id).unwrap().remove(room_id); + } + + // Room is destroyed(should a notification that user has left be sent before?) + let mut notif_builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let notif_status = room.gen_MatchingRoomStatus(&mut notif_builder, room_id, Some(0), None); + notif_builder.finish(notif_status, None); + let notif = notif_builder.finished_data().to_vec(); + + notifications.push((NotificationType::RoomDisappearedGUI, notif)); + + assert!(self.comid_rooms.get_mut(&room.communication_id).unwrap().remove(room_id)); + assert!(self.rooms.remove(room_id).is_some()); + return Ok((reply, set_user_ids, notifications)); + } + + // Grant owner to a random member + // Prepare an extra notification that owner has changed + let random_user = rand::thread_rng().gen_range(0..room.members.len()); + let new_owner_user_id = *room.members.iter_mut().nth(random_user).unwrap().0; + room.members.get_mut(&new_owner_user_id).unwrap().owner = true; + + let mut notif_builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let notif_status = room.gen_MatchingRoomStatus(&mut notif_builder, room_id, Some(new_owner_user_id), Some(&member_left)); + notif_builder.finish(notif_status, None); + let notif = notif_builder.finished_data().to_vec(); + + notifications.push((NotificationType::RoomOwnerChangedGUI, notif)); + } + + // Prepare the notification that user has left + let mut notif_builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let notif_status = room.gen_MatchingRoomStatus(&mut notif_builder, room_id, Some(0), Some(&member_left)); + notif_builder.finish(notif_status, None); + let notif = notif_builder.finished_data().to_vec(); + notifications.push((NotificationType::MemberLeftRoomGUI, notif)); + + Ok((reply, set_user_ids, notifications)) + } + + pub fn get_room_list_gui(&self, com_id: &ComId, req: &GetRoomListGUIRequest) -> Vec { + let list = self.comid_rooms.get(com_id); + + let range_start = if req.range_start() == 0 { + error!("GetRoomListGUIRequest.range_start was 0!"); + 1 + } else { + req.range_start() + }; + + let range_max = if req.range_max() == 0 || req.range_max() > 20 { + error!("GetRoomListGUIRequest.range_max was invalid: {}", req.range_max()); + 20 + } else { + req.range_max() + }; + + let mut matching_rooms = Vec::new(); + + if let Some(rooms) = list { + for room_id in rooms { + let room = self.rooms.get(room_id).unwrap(); + if room.is_match(&req.conds(), false) { + matching_rooms.push((room_id, room)); + } + } + } + + let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let mut list_rooms = Default::default(); + + if matching_rooms.len() >= range_start as usize { + let inc_attrs = if let Some(attr_ids) = req.attrs() { attr_ids.iter().collect() } else { Vec::new() }; + + let start = range_start as usize - 1; + let num_to_get = std::cmp::min(matching_rooms.len() - start, range_max as usize); + let end = start + num_to_get; + + let parsed_attrs: Vec<(u32, u32)> = inc_attrs.iter().map(|attr| (attr.attr_type(), attr.attr_id())).collect(); + + let mut room_list = Vec::new(); + for (room_id, room) in &matching_rooms[start..end] { + room_list.push(room.gen_MatchingRoom(&mut builder, room_id, &parsed_attrs)); + } + list_rooms = Some(builder.create_vector(&room_list)); + } + + let resp = MatchingRoomList::create( + &mut builder, + &MatchingRoomListArgs { + start: range_start, + total: matching_rooms.len() as u32, + rooms: list_rooms, + }, + ); + builder.finish(resp, None); + builder.finished_data().to_vec() + } + + pub fn search_join_gui(&mut self, com_id: &ComId, req: &SearchJoinRoomGUIRequest, cinfo: &ClientInfo) -> Result<(Vec, HashSet, Vec), ErrorType> { + let list = self.comid_rooms.get(com_id); + + if let Some(rooms) = list { + for room_id in rooms { + let room = self.rooms.get_mut(room_id).unwrap(); + if room.is_match(&req.conds(), true) { + let member_ids: HashSet = room.members.keys().copied().collect(); + GuiRoomManager::add_member_to_room(&mut self.user_rooms, room_id, cinfo, false, room); + + let reply = { + let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let room_data = room.gen_MatchingSearchJoinRoomInfo(&mut builder, room_id, None, None, req.attrs()); + builder.finish(room_data, None); + builder.finished_data().to_vec() + }; + + let notif = { + let mut notif_builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let notif_status = room.gen_MatchingRoomStatus(&mut notif_builder, room_id, Some(cinfo.user_id), None); + notif_builder.finish(notif_status, None); + notif_builder.finished_data().to_vec() + }; + + return Ok((reply, member_ids, notif)); + } + } + } + + Err(ErrorType::NotFound) + } + + pub fn get_rooms_by_user(&self, user: i64) -> Option> { + if !self.user_rooms.contains_key(&user) { + return None; + } + + Some(self.user_rooms.get(&user).unwrap().clone()) + } + + pub fn get_room_and_check_ownership(&mut self, room_id: &GuiRoomId, req_user_id: i64) -> Result<&mut GuiRoom, ErrorType> { + let room = self.rooms.get_mut(room_id).ok_or(ErrorType::NotFound)?; + + if !room.members.get(&req_user_id).ok_or(ErrorType::NotFound)?.owner { + return Err(ErrorType::Unauthorized); + } + + Ok(room) + } + + pub fn set_search_flag(&mut self, room_id: &GuiRoomId, stealth: bool, req_user_id: i64) -> Result<(), ErrorType> { + let room = self.get_room_and_check_ownership(room_id, req_user_id)?; + + if !room.quickmatch_room { + // We are assuming this is impossible for quickmatching + // SF2 HD Remix attempts to do it, not sure if an error should be returned + room.stealth = stealth; + } + + Ok(()) + } + + pub fn get_search_flag(&self, room_id: &GuiRoomId) -> Result, ErrorType> { + let room = self.rooms.get(room_id).ok_or(ErrorType::NotFound)?; + + let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let fb_matchingroom = room.gen_MatchingRoom(&mut builder, room_id, &vec![(SCE_NP_MATCHING_ATTR_TYPE_BASIC_NUM, SCE_NP_MATCHING_ROOM_ATTR_ID_ROOM_SEARCH_FLAG)]); + builder.finish(fb_matchingroom, None); + Ok(builder.finished_data().to_vec()) + } + + pub fn set_room_info_gui(&mut self, room_id: &GuiRoomId, attrs: flatbuffers::Vector>, req_user_id: i64) -> Result<(), ErrorType> { + let room = self.get_room_and_check_ownership(room_id, req_user_id)?; + + for attr in attrs { + room.set_attr(&attr); + } + + Ok(()) + } + + pub fn get_room_info_gui(&self, room_id: &GuiRoomId, attrs: flatbuffers::Vector>) -> Result, ErrorType> { + let room = self.rooms.get(room_id).ok_or(ErrorType::NotFound)?; + + let attrs_vec = &attrs.iter().map(|attr| (attr.attr_type(), attr.attr_id())).collect(); + + let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); + let fb_matchingroom = room.gen_MatchingRoom(&mut builder, room_id, attrs_vec); + builder.finish(fb_matchingroom, None); + Ok(builder.finished_data().to_vec()) + } +} diff --git a/src/server/room_manager.rs b/src/server/room_manager.rs index 4649ba6..040e96a 100644 --- a/src/server/room_manager.rs +++ b/src/server/room_manager.rs @@ -359,9 +359,9 @@ impl RoomUser { let online_name = builder.create_string(&self.online_name); let avatar_url = builder.create_string(&self.avatar_url); - let user_info = UserInfo2::create( + let user_info = UserInfo::create( builder, - &UserInfo2Args { + &UserInfoArgs { npId: Some(npid), onlineName: Some(online_name), avatarUrl: Some(avatar_url), @@ -628,9 +628,9 @@ impl Room { avatar_url = Some(s); } - final_owner_info = Some(UserInfo2::create( + final_owner_info = Some(UserInfo::create( builder, - &UserInfo2Args { + &UserInfoArgs { npId: npid, onlineName: online_name, avatarUrl: avatar_url, @@ -1002,8 +1002,7 @@ impl RoomManager { } self.rooms.insert((*com_id, *room_cnt), room); - let user_set = self.user_rooms.entry(cinfo.user_id).or_default(); - user_set.insert((*com_id, *room_cnt)); + self.user_rooms.entry(cinfo.user_id).or_default().insert((*com_id, *room_cnt)); // Prepare roomDataInternal let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); @@ -1038,8 +1037,7 @@ impl RoomManager { room.flag_attr |= SceNpMatching2FlagAttr::SCE_NP_MATCHING2_ROOM_FLAG_ATTR_FULL as u32; } - let user_set = self.user_rooms.entry(cinfo.user_id).or_default(); - user_set.insert((*com_id, room.room_id)); + self.user_rooms.entry(cinfo.user_id).or_default().insert((*com_id, room.room_id)); let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); let room_data = room.to_RoomDataInternal(&mut builder); @@ -1078,10 +1076,7 @@ impl RoomManager { } // Generate list of users left - let mut user_list = HashSet::new(); - for user in &room.users { - user_list.insert(user.1.user_id); - } + let user_list: HashSet = room.users.iter().map(|user| user.1.user_id).collect(); if member_id == room.owner { // Check if the room is getting destroyed @@ -1101,6 +1096,7 @@ impl RoomManager { if !found_successor && !room.users.is_empty() { let random_user = rand::thread_rng().gen_range(0..room.users.len()); room.owner = *room.users.keys().nth(random_user).unwrap(); + room.users.entry(room.owner).and_modify(|e| e.flag_attr |= SCE_NP_MATCHING2_ROOMMEMBER_FLAG_ATTR_OWNER); found_successor = true; } @@ -1108,6 +1104,12 @@ impl RoomManager { // Remove the room from appropriate list let lobby_id = room.lobby_id; let world_id = room.world_id; + + // Remove users from user_rooms + for user_id in &user_list { + self.user_rooms.get_mut(user_id).unwrap().remove(&(*com_id, room_id)); + } + if lobby_id == 0 { self.world_rooms.get_mut(&(*com_id, world_id)).unwrap().remove(&room_id); } else { @@ -1125,9 +1127,19 @@ impl RoomManager { let world_id = req.worldId(); let lobby_id = req.lobbyId(); - // Unclear what the given startIndex means - let startindex = 0; // req.rangeFilter_startIndex(); - let max = req.rangeFilter_max(); + let startindex = if req.rangeFilter_startIndex() == 0 { + error!("SearchRoomRequest.startIndex was 0!"); + 1 + } else { + req.rangeFilter_startIndex() + }; + + let max = if req.rangeFilter_max() == 0 || req.rangeFilter_max() > 20 { + error!("SearchRoomRequest.max was invalid: {}", req.rangeFilter_max()); + 20 + } else { + req.rangeFilter_max() + }; let mut list = None; if world_id != 0 { @@ -1138,28 +1150,27 @@ impl RoomManager { let mut matching_rooms = Vec::new(); - let mut num_found = 0; - if let Some(room_list) = list { for room_id in room_list.iter() { let room = self.get_room(com_id, *room_id); if room.is_match(req) { matching_rooms.push(room); - num_found += 1; - } - if num_found >= max { - break; } } } let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(1024); let mut list_roomdataexternal = Default::default(); - if !matching_rooms.is_empty() { + + if matching_rooms.len() >= startindex as usize { let inc_attrs = if let Some(attr_ids) = req.attrId() { attr_ids.iter().collect() } else { Vec::new() }; + let start = startindex as usize - 1; + let num_to_get = std::cmp::min(matching_rooms.len() - start, max as usize); + let end = start + num_to_get; + let mut room_list = Vec::new(); - for room in &matching_rooms { + for room in &matching_rooms[start..end] { room_list.push(room.to_RoomDataExternal(&mut builder, req.option(), &inc_attrs)); } list_roomdataexternal = Some(builder.create_vector(&room_list)); @@ -1170,7 +1181,6 @@ impl RoomManager { &SearchRoomResponseArgs { startIndex: startindex, total: matching_rooms.len() as u32, - size_: matching_rooms.len() as u32, rooms: list_roomdataexternal, }, ); diff --git a/src/server/score_cache.rs b/src/server/score_cache.rs index 5982edd..8fa4d38 100644 --- a/src/server/score_cache.rs +++ b/src/server/score_cache.rs @@ -2,7 +2,7 @@ use std::cmp::Ordering; use std::collections::{HashMap, HashSet}; use std::sync::Arc; -use crate::server::client::{Client, ComId, ErrorType}; +use crate::server::client::{com_id_to_string, Client, ComId, ErrorType}; use crate::server::database::db_score::{DbBoardInfo, DbScoreInfo}; use crate::server::database::Database; use crate::server::stream_extractor::np2_structs_generated::*; @@ -11,8 +11,6 @@ use crate::server::Server; use parking_lot::RwLock; use tracing::warn; -use super::client::com_id_to_string; - struct ScoreUserCache { npid: String, online_name: String, @@ -265,6 +263,9 @@ impl ScoresCache { initial_pos = Some(pos); } + // Update last insert/sort time + table.last_insert = Client::get_psn_timestamp(); + if (table.sorted_scores.len() < table.table_info.rank_limit as usize) || score.cmp(table.sorted_scores.last().unwrap(), table.table_info.sort_mode) == Ordering::Less { let insert_pos = table.sorted_scores.binary_search_by(|probe| probe.cmp(score, table.table_info.sort_mode)).unwrap_err(); table.sorted_scores.insert(insert_pos, (*score).clone()); diff --git a/src/server/stream_extractor.rs b/src/server/stream_extractor.rs index 364eeb9..abeedf4 100644 --- a/src/server/stream_extractor.rs +++ b/src/server/stream_extractor.rs @@ -5,7 +5,7 @@ pub mod np2_structs_generated; pub mod fb_helpers; -use crate::server::client::ComId; +use crate::server::client::{ComId, COMMUNICATION_ID_SIZE}; use num_traits::*; use std::cell::Cell; use std::mem; @@ -75,7 +75,7 @@ impl StreamExtractor { res_vec } pub fn get_com_id(&self) -> ComId { - let mut com_id: ComId = [0; 9]; + let mut com_id: ComId = [0; COMMUNICATION_ID_SIZE]; if self.i.get() + com_id.len() > self.vec.len() { self.error.set(true); @@ -85,8 +85,16 @@ impl StreamExtractor { } } - if !com_id.iter().all(|c| c.is_ascii_uppercase() || c.is_ascii_digit()) { - self.error.set(true) + if !com_id[0..9].iter().all(|c| c.is_ascii_uppercase() || c.is_ascii_digit()) { + self.error.set(true); + } + + if com_id[9] != b'_' { + self.error.set(true); + } + + if !com_id[10..12].iter().all(|c| c.is_ascii_digit()) { + self.error.set(true); } com_id diff --git a/src/server/stream_extractor/np2_structs.fbs b/src/server/stream_extractor/np2_structs.fbs index acfb9b0..634d3fe 100644 --- a/src/server/stream_extractor/np2_structs.fbs +++ b/src/server/stream_extractor/np2_structs.fbs @@ -32,14 +32,14 @@ table GroupConfig { withPassword:bool; } -table UserInfo2 { +table UserInfo { npId:string; onlineName:string; avatarUrl:string; } table RoomMemberDataInternal { - userInfo:UserInfo2; + userInfo:UserInfo; joinDate:uint64; memberId:uint16; teamId:uint8; @@ -84,7 +84,7 @@ table RoomDataExternal { openPrivateSlotNum:uint16; curMemberNum:uint16; passwordSlotMask:uint64; - owner:UserInfo2; + owner:UserInfo; roomGroup:[RoomGroup]; flagAttr:uint32; roomSearchableIntAttrExternal:[IntAttr]; @@ -128,7 +128,6 @@ table SearchRoomRequest { table SearchRoomResponse { startIndex:uint32; total:uint32; - size:uint32; rooms:[RoomDataExternal]; } @@ -262,7 +261,7 @@ table RoomMessageInfo { filtered:bool; castType:uint8; dst:[uint16]; - srcMember:UserInfo2; + srcMember:UserInfo; msg:[uint8]; } @@ -483,3 +482,79 @@ table SetPresenceRequest { comment:string; data:[uint8]; } + +table MatchingSearchCondition { + attr_type:uint32; + attr_id:uint32; + comp_op:uint32; + comp_value:uint32; +} + +table MatchingAttr { + attr_type:uint32; + attr_id:uint32; + num:uint32; + data:[uint8]; +} + +table CreateRoomGUIRequest { + total_slots:uint32; + private_slots:uint32; + privilege_grant:bool; + stealth:bool; + game_attrs:[MatchingAttr]; +} + +table GUIUserInfo { + info:UserInfo; + owner:bool; +} + +table MatchingRoomStatus { + id:[uint8]; + members:[GUIUserInfo]; + kick_actor:string; + opt:[uint8]; +} + +table GetRoomListGUIRequest { + range_start:uint32; + range_max:uint32; + conds:[MatchingSearchCondition]; + attrs:[MatchingAttr]; +} + +table MatchingRoom { + id:[uint8]; + attr:[MatchingAttr]; +} + +table MatchingRoomList { + start:uint32; + total:uint32; + rooms:[MatchingRoom]; +} + +table MatchingGuiRoomId { + id:[uint8]; +} + +table SetRoomSearchFlagGUI { + roomid:[uint8]; + stealth:bool; +} + +table QuickMatchGUIRequest { + conds:[MatchingSearchCondition]; + available_num:uint32; +} + +table SearchJoinRoomGUIRequest { + conds:[MatchingSearchCondition]; + attrs:[MatchingAttr]; +} + +table MatchingSearchJoinRoomInfo { + room:MatchingRoomStatus; + attr:[MatchingAttr]; +} diff --git a/src/server/stream_extractor/np2_structs_generated.rs b/src/server/stream_extractor/np2_structs_generated.rs index 900a229..df690ae 100644 --- a/src/server/stream_extractor/np2_structs_generated.rs +++ b/src/server/stream_extractor/np2_structs_generated.rs @@ -33,8 +33,8 @@ impl<'a> BinAttr<'a> { BinAttr { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args BinAttrArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = BinAttrBuilder::new(_fbb); @@ -87,11 +87,11 @@ impl<'a> Default for BinAttrArgs<'a> { } } -pub struct BinAttrBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct BinAttrBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> BinAttrBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BinAttrBuilder<'a, 'b, A> { #[inline] pub fn add_id(&mut self, id: u16) { self.fbb_.push_slot::(BinAttr::VT_ID, id, 0); @@ -101,7 +101,7 @@ impl<'a: 'b, 'b> BinAttrBuilder<'a, 'b> { self.fbb_.push_slot_always::>(BinAttr::VT_DATA, data); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> BinAttrBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BinAttrBuilder<'a, 'b, A> { let start = _fbb.start_table(); BinAttrBuilder { fbb_: _fbb, @@ -147,8 +147,8 @@ impl<'a> IntAttr<'a> { IntAttr { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args IntAttrArgs ) -> flatbuffers::WIPOffset> { let mut builder = IntAttrBuilder::new(_fbb); @@ -201,11 +201,11 @@ impl<'a> Default for IntAttrArgs { } } -pub struct IntAttrBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct IntAttrBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> IntAttrBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> IntAttrBuilder<'a, 'b, A> { #[inline] pub fn add_id(&mut self, id: u16) { self.fbb_.push_slot::(IntAttr::VT_ID, id, 0); @@ -215,7 +215,7 @@ impl<'a: 'b, 'b> IntAttrBuilder<'a, 'b> { self.fbb_.push_slot::(IntAttr::VT_NUM, num, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> IntAttrBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> IntAttrBuilder<'a, 'b, A> { let start = _fbb.start_table(); IntAttrBuilder { fbb_: _fbb, @@ -261,8 +261,8 @@ impl<'a> RoomMemberBinAttrInternal<'a> { RoomMemberBinAttrInternal { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RoomMemberBinAttrInternalArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RoomMemberBinAttrInternalBuilder::new(_fbb); @@ -315,11 +315,11 @@ impl<'a> Default for RoomMemberBinAttrInternalArgs<'a> { } } -pub struct RoomMemberBinAttrInternalBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RoomMemberBinAttrInternalBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RoomMemberBinAttrInternalBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RoomMemberBinAttrInternalBuilder<'a, 'b, A> { #[inline] pub fn add_updateDate(&mut self, updateDate: u64) { self.fbb_.push_slot::(RoomMemberBinAttrInternal::VT_UPDATEDATE, updateDate, 0); @@ -329,7 +329,7 @@ impl<'a: 'b, 'b> RoomMemberBinAttrInternalBuilder<'a, 'b> { self.fbb_.push_slot_always::>(RoomMemberBinAttrInternal::VT_DATA, data); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RoomMemberBinAttrInternalBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RoomMemberBinAttrInternalBuilder<'a, 'b, A> { let start = _fbb.start_table(); RoomMemberBinAttrInternalBuilder { fbb_: _fbb, @@ -376,8 +376,8 @@ impl<'a> BinAttrInternal<'a> { BinAttrInternal { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args BinAttrInternalArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = BinAttrInternalBuilder::new(_fbb); @@ -441,11 +441,11 @@ impl<'a> Default for BinAttrInternalArgs<'a> { } } -pub struct BinAttrInternalBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct BinAttrInternalBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> BinAttrInternalBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BinAttrInternalBuilder<'a, 'b, A> { #[inline] pub fn add_updateDate(&mut self, updateDate: u64) { self.fbb_.push_slot::(BinAttrInternal::VT_UPDATEDATE, updateDate, 0); @@ -459,7 +459,7 @@ impl<'a: 'b, 'b> BinAttrInternalBuilder<'a, 'b> { self.fbb_.push_slot_always::>(BinAttrInternal::VT_DATA, data); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> BinAttrInternalBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BinAttrInternalBuilder<'a, 'b, A> { let start = _fbb.start_table(); BinAttrInternalBuilder { fbb_: _fbb, @@ -507,8 +507,8 @@ impl<'a> OptParam<'a> { OptParam { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args OptParamArgs ) -> flatbuffers::WIPOffset> { let mut builder = OptParamBuilder::new(_fbb); @@ -572,11 +572,11 @@ impl<'a> Default for OptParamArgs { } } -pub struct OptParamBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct OptParamBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> OptParamBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> OptParamBuilder<'a, 'b, A> { #[inline] pub fn add_type_(&mut self, type_: u8) { self.fbb_.push_slot::(OptParam::VT_TYPE_, type_, 0); @@ -590,7 +590,7 @@ impl<'a: 'b, 'b> OptParamBuilder<'a, 'b> { self.fbb_.push_slot::(OptParam::VT_HUBMEMBERID, hubMemberId, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OptParamBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> OptParamBuilder<'a, 'b, A> { let start = _fbb.start_table(); OptParamBuilder { fbb_: _fbb, @@ -639,8 +639,8 @@ impl<'a> GroupConfig<'a> { GroupConfig { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GroupConfigArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = GroupConfigBuilder::new(_fbb); @@ -715,11 +715,11 @@ impl<'a> Default for GroupConfigArgs<'a> { } } -pub struct GroupConfigBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct GroupConfigBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> GroupConfigBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GroupConfigBuilder<'a, 'b, A> { #[inline] pub fn add_slotNum(&mut self, slotNum: u32) { self.fbb_.push_slot::(GroupConfig::VT_SLOTNUM, slotNum, 0); @@ -737,7 +737,7 @@ impl<'a: 'b, 'b> GroupConfigBuilder<'a, 'b> { self.fbb_.push_slot::(GroupConfig::VT_WITHPASSWORD, withPassword, false); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GroupConfigBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GroupConfigBuilder<'a, 'b, A> { let start = _fbb.start_table(); GroupConfigBuilder { fbb_: _fbb, @@ -761,36 +761,36 @@ impl core::fmt::Debug for GroupConfig<'_> { ds.finish() } } -pub enum UserInfo2Offset {} +pub enum UserInfoOffset {} #[derive(Copy, Clone, PartialEq)] -pub struct UserInfo2<'a> { +pub struct UserInfo<'a> { pub _tab: flatbuffers::Table<'a>, } -impl<'a> flatbuffers::Follow<'a> for UserInfo2<'a> { - type Inner = UserInfo2<'a>; +impl<'a> flatbuffers::Follow<'a> for UserInfo<'a> { + type Inner = UserInfo<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { _tab: flatbuffers::Table::new(buf, loc) } } } -impl<'a> UserInfo2<'a> { +impl<'a> UserInfo<'a> { pub const VT_NPID: flatbuffers::VOffsetT = 4; pub const VT_ONLINENAME: flatbuffers::VOffsetT = 6; pub const VT_AVATARURL: flatbuffers::VOffsetT = 8; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - UserInfo2 { _tab: table } + UserInfo { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args UserInfo2Args<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = UserInfo2Builder::new(_fbb); + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args UserInfoArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = UserInfoBuilder::new(_fbb); if let Some(x) = args.avatarUrl { builder.add_avatarUrl(x); } if let Some(x) = args.onlineName { builder.add_onlineName(x); } if let Some(x) = args.npId { builder.add_npId(x); } @@ -803,25 +803,25 @@ impl<'a> UserInfo2<'a> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::>(UserInfo2::VT_NPID, None)} + unsafe { self._tab.get::>(UserInfo::VT_NPID, None)} } #[inline] pub fn onlineName(&self) -> Option<&'a str> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::>(UserInfo2::VT_ONLINENAME, None)} + unsafe { self._tab.get::>(UserInfo::VT_ONLINENAME, None)} } #[inline] pub fn avatarUrl(&self) -> Option<&'a str> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::>(UserInfo2::VT_AVATARURL, None)} + unsafe { self._tab.get::>(UserInfo::VT_AVATARURL, None)} } } -impl flatbuffers::Verifiable for UserInfo2<'_> { +impl flatbuffers::Verifiable for UserInfo<'_> { #[inline] fn run_verifier( v: &mut flatbuffers::Verifier, pos: usize @@ -835,15 +835,15 @@ impl flatbuffers::Verifiable for UserInfo2<'_> { Ok(()) } } -pub struct UserInfo2Args<'a> { +pub struct UserInfoArgs<'a> { pub npId: Option>, pub onlineName: Option>, pub avatarUrl: Option>, } -impl<'a> Default for UserInfo2Args<'a> { +impl<'a> Default for UserInfoArgs<'a> { #[inline] fn default() -> Self { - UserInfo2Args { + UserInfoArgs { npId: None, onlineName: None, avatarUrl: None, @@ -851,41 +851,41 @@ impl<'a> Default for UserInfo2Args<'a> { } } -pub struct UserInfo2Builder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct UserInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> UserInfo2Builder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UserInfoBuilder<'a, 'b, A> { #[inline] pub fn add_npId(&mut self, npId: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UserInfo2::VT_NPID, npId); + self.fbb_.push_slot_always::>(UserInfo::VT_NPID, npId); } #[inline] pub fn add_onlineName(&mut self, onlineName: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UserInfo2::VT_ONLINENAME, onlineName); + self.fbb_.push_slot_always::>(UserInfo::VT_ONLINENAME, onlineName); } #[inline] pub fn add_avatarUrl(&mut self, avatarUrl: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(UserInfo2::VT_AVATARURL, avatarUrl); + self.fbb_.push_slot_always::>(UserInfo::VT_AVATARURL, avatarUrl); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> UserInfo2Builder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UserInfoBuilder<'a, 'b, A> { let start = _fbb.start_table(); - UserInfo2Builder { + UserInfoBuilder { fbb_: _fbb, start_: start, } } #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); flatbuffers::WIPOffset::new(o.value()) } } -impl core::fmt::Debug for UserInfo2<'_> { +impl core::fmt::Debug for UserInfo<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("UserInfo2"); + let mut ds = f.debug_struct("UserInfo"); ds.field("npId", &self.npId()); ds.field("onlineName", &self.onlineName()); ds.field("avatarUrl", &self.avatarUrl()); @@ -922,8 +922,8 @@ impl<'a> RoomMemberDataInternal<'a> { RoomMemberDataInternal { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RoomMemberDataInternalArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RoomMemberDataInternalBuilder::new(_fbb); @@ -940,11 +940,11 @@ impl<'a> RoomMemberDataInternal<'a> { #[inline] - pub fn userInfo(&self) -> Option> { + pub fn userInfo(&self) -> Option> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::>(RoomMemberDataInternal::VT_USERINFO, None)} + unsafe { self._tab.get::>(RoomMemberDataInternal::VT_USERINFO, None)} } #[inline] pub fn joinDate(&self) -> u64 { @@ -1004,7 +1004,7 @@ impl flatbuffers::Verifiable for RoomMemberDataInternal<'_> { ) -> Result<(), flatbuffers::InvalidFlatbuffer> { use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::>("userInfo", Self::VT_USERINFO, false)? + .visit_field::>("userInfo", Self::VT_USERINFO, false)? .visit_field::("joinDate", Self::VT_JOINDATE, false)? .visit_field::("memberId", Self::VT_MEMBERID, false)? .visit_field::("teamId", Self::VT_TEAMID, false)? @@ -1017,7 +1017,7 @@ impl flatbuffers::Verifiable for RoomMemberDataInternal<'_> { } } pub struct RoomMemberDataInternalArgs<'a> { - pub userInfo: Option>>, + pub userInfo: Option>>, pub joinDate: u64, pub memberId: u16, pub teamId: u8, @@ -1042,14 +1042,14 @@ impl<'a> Default for RoomMemberDataInternalArgs<'a> { } } -pub struct RoomMemberDataInternalBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RoomMemberDataInternalBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RoomMemberDataInternalBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RoomMemberDataInternalBuilder<'a, 'b, A> { #[inline] - pub fn add_userInfo(&mut self, userInfo: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(RoomMemberDataInternal::VT_USERINFO, userInfo); + pub fn add_userInfo(&mut self, userInfo: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(RoomMemberDataInternal::VT_USERINFO, userInfo); } #[inline] pub fn add_joinDate(&mut self, joinDate: u64) { @@ -1080,7 +1080,7 @@ impl<'a: 'b, 'b> RoomMemberDataInternalBuilder<'a, 'b> { self.fbb_.push_slot_always::>(RoomMemberDataInternal::VT_ROOMMEMBERBINATTRINTERNAL, roomMemberBinAttrInternal); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RoomMemberDataInternalBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RoomMemberDataInternalBuilder<'a, 'b, A> { let start = _fbb.start_table(); RoomMemberDataInternalBuilder { fbb_: _fbb, @@ -1136,8 +1136,8 @@ impl<'a> RoomGroup<'a> { RoomGroup { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RoomGroupArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RoomGroupBuilder::new(_fbb); @@ -1234,11 +1234,11 @@ impl<'a> Default for RoomGroupArgs<'a> { } } -pub struct RoomGroupBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RoomGroupBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RoomGroupBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RoomGroupBuilder<'a, 'b, A> { #[inline] pub fn add_groupId(&mut self, groupId: u8) { self.fbb_.push_slot::(RoomGroup::VT_GROUPID, groupId, 0); @@ -1264,7 +1264,7 @@ impl<'a: 'b, 'b> RoomGroupBuilder<'a, 'b> { self.fbb_.push_slot::(RoomGroup::VT_CURGROUPMEMBERNUM, curGroupMemberNum, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RoomGroupBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RoomGroupBuilder<'a, 'b, A> { let start = _fbb.start_table(); RoomGroupBuilder { fbb_: _fbb, @@ -1323,8 +1323,8 @@ impl<'a> RoomDataInternal<'a> { RoomDataInternal { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RoomDataInternalArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RoomDataInternalBuilder::new(_fbb); @@ -1476,11 +1476,11 @@ impl<'a> Default for RoomDataInternalArgs<'a> { } } -pub struct RoomDataInternalBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RoomDataInternalBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RoomDataInternalBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RoomDataInternalBuilder<'a, 'b, A> { #[inline] pub fn add_serverId(&mut self, serverId: u16) { self.fbb_.push_slot::(RoomDataInternal::VT_SERVERID, serverId, 0); @@ -1526,7 +1526,7 @@ impl<'a: 'b, 'b> RoomDataInternalBuilder<'a, 'b> { self.fbb_.push_slot_always::>(RoomDataInternal::VT_ROOMBINATTRINTERNAL, roomBinAttrInternal); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RoomDataInternalBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RoomDataInternalBuilder<'a, 'b, A> { let start = _fbb.start_table(); RoomDataInternalBuilder { fbb_: _fbb, @@ -1596,8 +1596,8 @@ impl<'a> RoomDataExternal<'a> { RoomDataExternal { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RoomDataExternalArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RoomDataExternalBuilder::new(_fbb); @@ -1700,11 +1700,11 @@ impl<'a> RoomDataExternal<'a> { unsafe { self._tab.get::(RoomDataExternal::VT_PASSWORDSLOTMASK, Some(0)).unwrap()} } #[inline] - pub fn owner(&self) -> Option> { + pub fn owner(&self) -> Option> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::>(RoomDataExternal::VT_OWNER, None)} + unsafe { self._tab.get::>(RoomDataExternal::VT_OWNER, None)} } #[inline] pub fn roomGroup(&self) -> Option>>> { @@ -1761,7 +1761,7 @@ impl flatbuffers::Verifiable for RoomDataExternal<'_> { .visit_field::("openPrivateSlotNum", Self::VT_OPENPRIVATESLOTNUM, false)? .visit_field::("curMemberNum", Self::VT_CURMEMBERNUM, false)? .visit_field::("passwordSlotMask", Self::VT_PASSWORDSLOTMASK, false)? - .visit_field::>("owner", Self::VT_OWNER, false)? + .visit_field::>("owner", Self::VT_OWNER, false)? .visit_field::>>>("roomGroup", Self::VT_ROOMGROUP, false)? .visit_field::("flagAttr", Self::VT_FLAGATTR, false)? .visit_field::>>>("roomSearchableIntAttrExternal", Self::VT_ROOMSEARCHABLEINTATTREXTERNAL, false)? @@ -1783,7 +1783,7 @@ pub struct RoomDataExternalArgs<'a> { pub openPrivateSlotNum: u16, pub curMemberNum: u16, pub passwordSlotMask: u64, - pub owner: Option>>, + pub owner: Option>>, pub roomGroup: Option>>>>, pub flagAttr: u32, pub roomSearchableIntAttrExternal: Option>>>>, @@ -1815,11 +1815,11 @@ impl<'a> Default for RoomDataExternalArgs<'a> { } } -pub struct RoomDataExternalBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RoomDataExternalBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RoomDataExternalBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RoomDataExternalBuilder<'a, 'b, A> { #[inline] pub fn add_serverId(&mut self, serverId: u16) { self.fbb_.push_slot::(RoomDataExternal::VT_SERVERID, serverId, 0); @@ -1865,8 +1865,8 @@ impl<'a: 'b, 'b> RoomDataExternalBuilder<'a, 'b> { self.fbb_.push_slot::(RoomDataExternal::VT_PASSWORDSLOTMASK, passwordSlotMask, 0); } #[inline] - pub fn add_owner(&mut self, owner: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(RoomDataExternal::VT_OWNER, owner); + pub fn add_owner(&mut self, owner: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(RoomDataExternal::VT_OWNER, owner); } #[inline] pub fn add_roomGroup(&mut self, roomGroup: flatbuffers::WIPOffset>>>) { @@ -1889,7 +1889,7 @@ impl<'a: 'b, 'b> RoomDataExternalBuilder<'a, 'b> { self.fbb_.push_slot_always::>(RoomDataExternal::VT_ROOMBINATTREXTERNAL, roomBinAttrExternal); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RoomDataExternalBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RoomDataExternalBuilder<'a, 'b, A> { let start = _fbb.start_table(); RoomDataExternalBuilder { fbb_: _fbb, @@ -1950,8 +1950,8 @@ impl<'a> IntSearchFilter<'a> { IntSearchFilter { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args IntSearchFilterArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = IntSearchFilterBuilder::new(_fbb); @@ -2004,11 +2004,11 @@ impl<'a> Default for IntSearchFilterArgs<'a> { } } -pub struct IntSearchFilterBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct IntSearchFilterBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> IntSearchFilterBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> IntSearchFilterBuilder<'a, 'b, A> { #[inline] pub fn add_searchOperator(&mut self, searchOperator: u8) { self.fbb_.push_slot::(IntSearchFilter::VT_SEARCHOPERATOR, searchOperator, 0); @@ -2018,7 +2018,7 @@ impl<'a: 'b, 'b> IntSearchFilterBuilder<'a, 'b> { self.fbb_.push_slot_always::>(IntSearchFilter::VT_ATTR, attr); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> IntSearchFilterBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> IntSearchFilterBuilder<'a, 'b, A> { let start = _fbb.start_table(); IntSearchFilterBuilder { fbb_: _fbb, @@ -2064,8 +2064,8 @@ impl<'a> BinSearchFilter<'a> { BinSearchFilter { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args BinSearchFilterArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = BinSearchFilterBuilder::new(_fbb); @@ -2118,11 +2118,11 @@ impl<'a> Default for BinSearchFilterArgs<'a> { } } -pub struct BinSearchFilterBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct BinSearchFilterBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> BinSearchFilterBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BinSearchFilterBuilder<'a, 'b, A> { #[inline] pub fn add_searchOperator(&mut self, searchOperator: u8) { self.fbb_.push_slot::(BinSearchFilter::VT_SEARCHOPERATOR, searchOperator, 0); @@ -2132,7 +2132,7 @@ impl<'a: 'b, 'b> BinSearchFilterBuilder<'a, 'b> { self.fbb_.push_slot_always::>(BinSearchFilter::VT_ATTR, attr); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> BinSearchFilterBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BinSearchFilterBuilder<'a, 'b, A> { let start = _fbb.start_table(); BinSearchFilterBuilder { fbb_: _fbb, @@ -2178,8 +2178,8 @@ impl<'a> PresenceOptionData<'a> { PresenceOptionData { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args PresenceOptionDataArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = PresenceOptionDataBuilder::new(_fbb); @@ -2232,11 +2232,11 @@ impl<'a> Default for PresenceOptionDataArgs<'a> { } } -pub struct PresenceOptionDataBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct PresenceOptionDataBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> PresenceOptionDataBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PresenceOptionDataBuilder<'a, 'b, A> { #[inline] pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(PresenceOptionData::VT_DATA, data); @@ -2246,7 +2246,7 @@ impl<'a: 'b, 'b> PresenceOptionDataBuilder<'a, 'b> { self.fbb_.push_slot::(PresenceOptionData::VT_LEN, len, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> PresenceOptionDataBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PresenceOptionDataBuilder<'a, 'b, A> { let start = _fbb.start_table(); PresenceOptionDataBuilder { fbb_: _fbb, @@ -2292,8 +2292,8 @@ impl<'a> RoomGroupPasswordConfig<'a> { RoomGroupPasswordConfig { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RoomGroupPasswordConfigArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RoomGroupPasswordConfigBuilder::new(_fbb); @@ -2346,11 +2346,11 @@ impl<'a> Default for RoomGroupPasswordConfigArgs<'a> { } } -pub struct RoomGroupPasswordConfigBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RoomGroupPasswordConfigBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RoomGroupPasswordConfigBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RoomGroupPasswordConfigBuilder<'a, 'b, A> { #[inline] pub fn add_groupId(&mut self, groupId: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(RoomGroupPasswordConfig::VT_GROUPID, groupId); @@ -2360,7 +2360,7 @@ impl<'a: 'b, 'b> RoomGroupPasswordConfigBuilder<'a, 'b> { self.fbb_.push_slot::(RoomGroupPasswordConfig::VT_WITHPASSWORD, withPassword, false); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RoomGroupPasswordConfigBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RoomGroupPasswordConfigBuilder<'a, 'b, A> { let start = _fbb.start_table(); RoomGroupPasswordConfigBuilder { fbb_: _fbb, @@ -2414,8 +2414,8 @@ impl<'a> SearchRoomRequest<'a> { SearchRoomRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SearchRoomRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SearchRoomRequestBuilder::new(_fbb); @@ -2556,11 +2556,11 @@ impl<'a> Default for SearchRoomRequestArgs<'a> { } } -pub struct SearchRoomRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct SearchRoomRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> SearchRoomRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SearchRoomRequestBuilder<'a, 'b, A> { #[inline] pub fn add_option(&mut self, option: i32) { self.fbb_.push_slot::(SearchRoomRequest::VT_OPTION, option, 0); @@ -2602,7 +2602,7 @@ impl<'a: 'b, 'b> SearchRoomRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(SearchRoomRequest::VT_ATTRID, attrId); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SearchRoomRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SearchRoomRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); SearchRoomRequestBuilder { fbb_: _fbb, @@ -2650,21 +2650,19 @@ impl<'a> flatbuffers::Follow<'a> for SearchRoomResponse<'a> { impl<'a> SearchRoomResponse<'a> { pub const VT_STARTINDEX: flatbuffers::VOffsetT = 4; pub const VT_TOTAL: flatbuffers::VOffsetT = 6; - pub const VT_SIZE_: flatbuffers::VOffsetT = 8; - pub const VT_ROOMS: flatbuffers::VOffsetT = 10; + pub const VT_ROOMS: flatbuffers::VOffsetT = 8; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { SearchRoomResponse { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SearchRoomResponseArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SearchRoomResponseBuilder::new(_fbb); if let Some(x) = args.rooms { builder.add_rooms(x); } - builder.add_size_(args.size_); builder.add_total(args.total); builder.add_startIndex(args.startIndex); builder.finish() @@ -2686,13 +2684,6 @@ impl<'a> SearchRoomResponse<'a> { unsafe { self._tab.get::(SearchRoomResponse::VT_TOTAL, Some(0)).unwrap()} } #[inline] - pub fn size_(&self) -> u32 { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::(SearchRoomResponse::VT_SIZE_, Some(0)).unwrap()} - } - #[inline] pub fn rooms(&self) -> Option>>> { // Safety: // Created from valid Table for this object @@ -2710,7 +2701,6 @@ impl flatbuffers::Verifiable for SearchRoomResponse<'_> { v.visit_table(pos)? .visit_field::("startIndex", Self::VT_STARTINDEX, false)? .visit_field::("total", Self::VT_TOTAL, false)? - .visit_field::("size_", Self::VT_SIZE_, false)? .visit_field::>>>("rooms", Self::VT_ROOMS, false)? .finish(); Ok(()) @@ -2719,7 +2709,6 @@ impl flatbuffers::Verifiable for SearchRoomResponse<'_> { pub struct SearchRoomResponseArgs<'a> { pub startIndex: u32, pub total: u32, - pub size_: u32, pub rooms: Option>>>>, } impl<'a> Default for SearchRoomResponseArgs<'a> { @@ -2728,17 +2717,16 @@ impl<'a> Default for SearchRoomResponseArgs<'a> { SearchRoomResponseArgs { startIndex: 0, total: 0, - size_: 0, rooms: None, } } } -pub struct SearchRoomResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct SearchRoomResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> SearchRoomResponseBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SearchRoomResponseBuilder<'a, 'b, A> { #[inline] pub fn add_startIndex(&mut self, startIndex: u32) { self.fbb_.push_slot::(SearchRoomResponse::VT_STARTINDEX, startIndex, 0); @@ -2748,15 +2736,11 @@ impl<'a: 'b, 'b> SearchRoomResponseBuilder<'a, 'b> { self.fbb_.push_slot::(SearchRoomResponse::VT_TOTAL, total, 0); } #[inline] - pub fn add_size_(&mut self, size_: u32) { - self.fbb_.push_slot::(SearchRoomResponse::VT_SIZE_, size_, 0); - } - #[inline] pub fn add_rooms(&mut self, rooms: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(SearchRoomResponse::VT_ROOMS, rooms); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SearchRoomResponseBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SearchRoomResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); SearchRoomResponseBuilder { fbb_: _fbb, @@ -2775,7 +2759,6 @@ impl core::fmt::Debug for SearchRoomResponse<'_> { let mut ds = f.debug_struct("SearchRoomResponse"); ds.field("startIndex", &self.startIndex()); ds.field("total", &self.total()); - ds.field("size_", &self.size_()); ds.field("rooms", &self.rooms()); ds.finish() } @@ -2819,8 +2802,8 @@ impl<'a> CreateJoinRoomRequest<'a> { CreateJoinRoomRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args CreateJoinRoomRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = CreateJoinRoomRequestBuilder::new(_fbb); @@ -3038,11 +3021,11 @@ impl<'a> Default for CreateJoinRoomRequestArgs<'a> { } } -pub struct CreateJoinRoomRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct CreateJoinRoomRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> CreateJoinRoomRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CreateJoinRoomRequestBuilder<'a, 'b, A> { #[inline] pub fn add_worldId(&mut self, worldId: u32) { self.fbb_.push_slot::(CreateJoinRoomRequest::VT_WORLDID, worldId, 0); @@ -3112,7 +3095,7 @@ impl<'a: 'b, 'b> CreateJoinRoomRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(CreateJoinRoomRequest::VT_SIGOPTPARAM, sigOptParam); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> CreateJoinRoomRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CreateJoinRoomRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); CreateJoinRoomRequestBuilder { fbb_: _fbb, @@ -3177,8 +3160,8 @@ impl<'a> JoinRoomRequest<'a> { JoinRoomRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args JoinRoomRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = JoinRoomRequestBuilder::new(_fbb); @@ -3275,11 +3258,11 @@ impl<'a> Default for JoinRoomRequestArgs<'a> { } } -pub struct JoinRoomRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct JoinRoomRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> JoinRoomRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> JoinRoomRequestBuilder<'a, 'b, A> { #[inline] pub fn add_roomId(&mut self, roomId: u64) { self.fbb_.push_slot::(JoinRoomRequest::VT_ROOMID, roomId, 0); @@ -3305,7 +3288,7 @@ impl<'a: 'b, 'b> JoinRoomRequestBuilder<'a, 'b> { self.fbb_.push_slot::(JoinRoomRequest::VT_TEAMID, teamId, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> JoinRoomRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> JoinRoomRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); JoinRoomRequestBuilder { fbb_: _fbb, @@ -3355,8 +3338,8 @@ impl<'a> LeaveRoomRequest<'a> { LeaveRoomRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args LeaveRoomRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = LeaveRoomRequestBuilder::new(_fbb); @@ -3409,11 +3392,11 @@ impl<'a> Default for LeaveRoomRequestArgs<'a> { } } -pub struct LeaveRoomRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct LeaveRoomRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> LeaveRoomRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LeaveRoomRequestBuilder<'a, 'b, A> { #[inline] pub fn add_roomId(&mut self, roomId: u64) { self.fbb_.push_slot::(LeaveRoomRequest::VT_ROOMID, roomId, 0); @@ -3423,7 +3406,7 @@ impl<'a: 'b, 'b> LeaveRoomRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(LeaveRoomRequest::VT_OPTDATA, optData); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> LeaveRoomRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> LeaveRoomRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); LeaveRoomRequestBuilder { fbb_: _fbb, @@ -3469,8 +3452,8 @@ impl<'a> GetRoomDataExternalListRequest<'a> { GetRoomDataExternalListRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetRoomDataExternalListRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = GetRoomDataExternalListRequestBuilder::new(_fbb); @@ -3523,11 +3506,11 @@ impl<'a> Default for GetRoomDataExternalListRequestArgs<'a> { } } -pub struct GetRoomDataExternalListRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct GetRoomDataExternalListRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> GetRoomDataExternalListRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetRoomDataExternalListRequestBuilder<'a, 'b, A> { #[inline] pub fn add_roomIds(&mut self, roomIds: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(GetRoomDataExternalListRequest::VT_ROOMIDS, roomIds); @@ -3537,7 +3520,7 @@ impl<'a: 'b, 'b> GetRoomDataExternalListRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(GetRoomDataExternalListRequest::VT_ATTRIDS, attrIds); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GetRoomDataExternalListRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetRoomDataExternalListRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetRoomDataExternalListRequestBuilder { fbb_: _fbb, @@ -3582,8 +3565,8 @@ impl<'a> GetRoomDataExternalListResponse<'a> { GetRoomDataExternalListResponse { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetRoomDataExternalListResponseArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = GetRoomDataExternalListResponseBuilder::new(_fbb); @@ -3625,17 +3608,17 @@ impl<'a> Default for GetRoomDataExternalListResponseArgs<'a> { } } -pub struct GetRoomDataExternalListResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct GetRoomDataExternalListResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> GetRoomDataExternalListResponseBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetRoomDataExternalListResponseBuilder<'a, 'b, A> { #[inline] pub fn add_rooms(&mut self, rooms: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(GetRoomDataExternalListResponse::VT_ROOMS, rooms); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GetRoomDataExternalListResponseBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetRoomDataExternalListResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetRoomDataExternalListResponseBuilder { fbb_: _fbb, @@ -3682,8 +3665,8 @@ impl<'a> SetRoomDataExternalRequest<'a> { SetRoomDataExternalRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SetRoomDataExternalRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SetRoomDataExternalRequestBuilder::new(_fbb); @@ -3758,11 +3741,11 @@ impl<'a> Default for SetRoomDataExternalRequestArgs<'a> { } } -pub struct SetRoomDataExternalRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct SetRoomDataExternalRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> SetRoomDataExternalRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SetRoomDataExternalRequestBuilder<'a, 'b, A> { #[inline] pub fn add_roomId(&mut self, roomId: u64) { self.fbb_.push_slot::(SetRoomDataExternalRequest::VT_ROOMID, roomId, 0); @@ -3780,7 +3763,7 @@ impl<'a: 'b, 'b> SetRoomDataExternalRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(SetRoomDataExternalRequest::VT_ROOMBINATTREXTERNAL, roomBinAttrExternal); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SetRoomDataExternalRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SetRoomDataExternalRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); SetRoomDataExternalRequestBuilder { fbb_: _fbb, @@ -3833,8 +3816,8 @@ impl<'a> SetRoomDataInternalRequest<'a> { SetRoomDataInternalRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SetRoomDataInternalRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SetRoomDataInternalRequestBuilder::new(_fbb); @@ -3942,11 +3925,11 @@ impl<'a> Default for SetRoomDataInternalRequestArgs<'a> { } } -pub struct SetRoomDataInternalRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct SetRoomDataInternalRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> SetRoomDataInternalRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SetRoomDataInternalRequestBuilder<'a, 'b, A> { #[inline] pub fn add_roomId(&mut self, roomId: u64) { self.fbb_.push_slot::(SetRoomDataInternalRequest::VT_ROOMID, roomId, 0); @@ -3976,7 +3959,7 @@ impl<'a: 'b, 'b> SetRoomDataInternalRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(SetRoomDataInternalRequest::VT_OWNERPRIVILEGERANK, ownerPrivilegeRank); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SetRoomDataInternalRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SetRoomDataInternalRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); SetRoomDataInternalRequestBuilder { fbb_: _fbb, @@ -4028,8 +4011,8 @@ impl<'a> GetRoomMemberDataInternalRequest<'a> { GetRoomMemberDataInternalRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetRoomMemberDataInternalRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = GetRoomMemberDataInternalRequestBuilder::new(_fbb); @@ -4093,11 +4076,11 @@ impl<'a> Default for GetRoomMemberDataInternalRequestArgs<'a> { } } -pub struct GetRoomMemberDataInternalRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct GetRoomMemberDataInternalRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> GetRoomMemberDataInternalRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetRoomMemberDataInternalRequestBuilder<'a, 'b, A> { #[inline] pub fn add_roomId(&mut self, roomId: u64) { self.fbb_.push_slot::(GetRoomMemberDataInternalRequest::VT_ROOMID, roomId, 0); @@ -4111,7 +4094,7 @@ impl<'a: 'b, 'b> GetRoomMemberDataInternalRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(GetRoomMemberDataInternalRequest::VT_ATTRID, attrId); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GetRoomMemberDataInternalRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetRoomMemberDataInternalRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetRoomMemberDataInternalRequestBuilder { fbb_: _fbb, @@ -4160,8 +4143,8 @@ impl<'a> SetRoomMemberDataInternalRequest<'a> { SetRoomMemberDataInternalRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SetRoomMemberDataInternalRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SetRoomMemberDataInternalRequestBuilder::new(_fbb); @@ -4236,11 +4219,11 @@ impl<'a> Default for SetRoomMemberDataInternalRequestArgs<'a> { } } -pub struct SetRoomMemberDataInternalRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct SetRoomMemberDataInternalRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> SetRoomMemberDataInternalRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SetRoomMemberDataInternalRequestBuilder<'a, 'b, A> { #[inline] pub fn add_roomId(&mut self, roomId: u64) { self.fbb_.push_slot::(SetRoomMemberDataInternalRequest::VT_ROOMID, roomId, 0); @@ -4258,7 +4241,7 @@ impl<'a: 'b, 'b> SetRoomMemberDataInternalRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(SetRoomMemberDataInternalRequest::VT_ROOMMEMBERBINATTRINTERNAL, roomMemberBinAttrInternal); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SetRoomMemberDataInternalRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SetRoomMemberDataInternalRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); SetRoomMemberDataInternalRequestBuilder { fbb_: _fbb, @@ -4306,8 +4289,8 @@ impl<'a> SetUserInfo<'a> { SetUserInfo { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SetUserInfoArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SetUserInfoBuilder::new(_fbb); @@ -4360,11 +4343,11 @@ impl<'a> Default for SetUserInfoArgs<'a> { } } -pub struct SetUserInfoBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct SetUserInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> SetUserInfoBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SetUserInfoBuilder<'a, 'b, A> { #[inline] pub fn add_serverId(&mut self, serverId: u16) { self.fbb_.push_slot::(SetUserInfo::VT_SERVERID, serverId, 0); @@ -4374,7 +4357,7 @@ impl<'a: 'b, 'b> SetUserInfoBuilder<'a, 'b> { self.fbb_.push_slot_always::>(SetUserInfo::VT_USERBINATTR, userBinAttr); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SetUserInfoBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SetUserInfoBuilder<'a, 'b, A> { let start = _fbb.start_table(); SetUserInfoBuilder { fbb_: _fbb, @@ -4420,8 +4403,8 @@ impl<'a> GetRoomDataInternalRequest<'a> { GetRoomDataInternalRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetRoomDataInternalRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = GetRoomDataInternalRequestBuilder::new(_fbb); @@ -4474,11 +4457,11 @@ impl<'a> Default for GetRoomDataInternalRequestArgs<'a> { } } -pub struct GetRoomDataInternalRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct GetRoomDataInternalRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> GetRoomDataInternalRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetRoomDataInternalRequestBuilder<'a, 'b, A> { #[inline] pub fn add_roomId(&mut self, roomId: u64) { self.fbb_.push_slot::(GetRoomDataInternalRequest::VT_ROOMID, roomId, 0); @@ -4488,7 +4471,7 @@ impl<'a: 'b, 'b> GetRoomDataInternalRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(GetRoomDataInternalRequest::VT_ATTRID, attrId); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GetRoomDataInternalRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetRoomDataInternalRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetRoomDataInternalRequestBuilder { fbb_: _fbb, @@ -4535,8 +4518,8 @@ impl<'a> RoomMemberUpdateInfo<'a> { RoomMemberUpdateInfo { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RoomMemberUpdateInfoArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RoomMemberUpdateInfoBuilder::new(_fbb); @@ -4600,11 +4583,11 @@ impl<'a> Default for RoomMemberUpdateInfoArgs<'a> { } } -pub struct RoomMemberUpdateInfoBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RoomMemberUpdateInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RoomMemberUpdateInfoBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RoomMemberUpdateInfoBuilder<'a, 'b, A> { #[inline] pub fn add_roomMemberDataInternal(&mut self, roomMemberDataInternal: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(RoomMemberUpdateInfo::VT_ROOMMEMBERDATAINTERNAL, roomMemberDataInternal); @@ -4618,7 +4601,7 @@ impl<'a: 'b, 'b> RoomMemberUpdateInfoBuilder<'a, 'b> { self.fbb_.push_slot_always::>(RoomMemberUpdateInfo::VT_OPTDATA, optData); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RoomMemberUpdateInfoBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RoomMemberUpdateInfoBuilder<'a, 'b, A> { let start = _fbb.start_table(); RoomMemberUpdateInfoBuilder { fbb_: _fbb, @@ -4666,8 +4649,8 @@ impl<'a> RoomUpdateInfo<'a> { RoomUpdateInfo { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RoomUpdateInfoArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RoomUpdateInfoBuilder::new(_fbb); @@ -4731,11 +4714,11 @@ impl<'a> Default for RoomUpdateInfoArgs<'a> { } } -pub struct RoomUpdateInfoBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RoomUpdateInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RoomUpdateInfoBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RoomUpdateInfoBuilder<'a, 'b, A> { #[inline] pub fn add_eventCause(&mut self, eventCause: u8) { self.fbb_.push_slot::(RoomUpdateInfo::VT_EVENTCAUSE, eventCause, 0); @@ -4749,7 +4732,7 @@ impl<'a: 'b, 'b> RoomUpdateInfoBuilder<'a, 'b> { self.fbb_.push_slot_always::>(RoomUpdateInfo::VT_OPTDATA, optData); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RoomUpdateInfoBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RoomUpdateInfoBuilder<'a, 'b, A> { let start = _fbb.start_table(); RoomUpdateInfoBuilder { fbb_: _fbb, @@ -4799,8 +4782,8 @@ impl<'a> RoomDataInternalUpdateInfo<'a> { RoomDataInternalUpdateInfo { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RoomDataInternalUpdateInfoArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RoomDataInternalUpdateInfoBuilder::new(_fbb); @@ -4886,11 +4869,11 @@ impl<'a> Default for RoomDataInternalUpdateInfoArgs<'a> { } } -pub struct RoomDataInternalUpdateInfoBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RoomDataInternalUpdateInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RoomDataInternalUpdateInfoBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RoomDataInternalUpdateInfoBuilder<'a, 'b, A> { #[inline] pub fn add_newRoomDataInternal(&mut self, newRoomDataInternal: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(RoomDataInternalUpdateInfo::VT_NEWROOMDATAINTERNAL, newRoomDataInternal); @@ -4912,7 +4895,7 @@ impl<'a: 'b, 'b> RoomDataInternalUpdateInfoBuilder<'a, 'b> { self.fbb_.push_slot_always::>(RoomDataInternalUpdateInfo::VT_NEWROOMBINATTRINTERNAL, newRoomBinAttrInternal); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RoomDataInternalUpdateInfoBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RoomDataInternalUpdateInfoBuilder<'a, 'b, A> { let start = _fbb.start_table(); RoomDataInternalUpdateInfoBuilder { fbb_: _fbb, @@ -4963,8 +4946,8 @@ impl<'a> RoomMemberDataInternalUpdateInfo<'a> { RoomMemberDataInternalUpdateInfo { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RoomMemberDataInternalUpdateInfoArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RoomMemberDataInternalUpdateInfoBuilder::new(_fbb); @@ -5039,11 +5022,11 @@ impl<'a> Default for RoomMemberDataInternalUpdateInfoArgs<'a> { } } -pub struct RoomMemberDataInternalUpdateInfoBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RoomMemberDataInternalUpdateInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RoomMemberDataInternalUpdateInfoBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RoomMemberDataInternalUpdateInfoBuilder<'a, 'b, A> { #[inline] pub fn add_newRoomMemberDataInternal(&mut self, newRoomMemberDataInternal: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(RoomMemberDataInternalUpdateInfo::VT_NEWROOMMEMBERDATAINTERNAL, newRoomMemberDataInternal); @@ -5061,7 +5044,7 @@ impl<'a: 'b, 'b> RoomMemberDataInternalUpdateInfoBuilder<'a, 'b> { self.fbb_.push_slot_always::>(RoomMemberDataInternalUpdateInfo::VT_NEWROOMMEMBERBINATTRINTERNAL, newRoomMemberBinAttrInternal); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RoomMemberDataInternalUpdateInfoBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RoomMemberDataInternalUpdateInfoBuilder<'a, 'b, A> { let start = _fbb.start_table(); RoomMemberDataInternalUpdateInfoBuilder { fbb_: _fbb, @@ -5111,8 +5094,8 @@ impl<'a> GetPingInfoResponse<'a> { GetPingInfoResponse { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetPingInfoResponseArgs ) -> flatbuffers::WIPOffset> { let mut builder = GetPingInfoResponseBuilder::new(_fbb); @@ -5187,11 +5170,11 @@ impl<'a> Default for GetPingInfoResponseArgs { } } -pub struct GetPingInfoResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct GetPingInfoResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> GetPingInfoResponseBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetPingInfoResponseBuilder<'a, 'b, A> { #[inline] pub fn add_serverId(&mut self, serverId: u16) { self.fbb_.push_slot::(GetPingInfoResponse::VT_SERVERID, serverId, 0); @@ -5209,7 +5192,7 @@ impl<'a: 'b, 'b> GetPingInfoResponseBuilder<'a, 'b> { self.fbb_.push_slot::(GetPingInfoResponse::VT_RTT, rtt, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GetPingInfoResponseBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetPingInfoResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetPingInfoResponseBuilder { fbb_: _fbb, @@ -5260,8 +5243,8 @@ impl<'a> SendRoomMessageRequest<'a> { SendRoomMessageRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SendRoomMessageRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SendRoomMessageRequestBuilder::new(_fbb); @@ -5347,11 +5330,11 @@ impl<'a> Default for SendRoomMessageRequestArgs<'a> { } } -pub struct SendRoomMessageRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct SendRoomMessageRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> SendRoomMessageRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SendRoomMessageRequestBuilder<'a, 'b, A> { #[inline] pub fn add_roomId(&mut self, roomId: u64) { self.fbb_.push_slot::(SendRoomMessageRequest::VT_ROOMID, roomId, 0); @@ -5373,7 +5356,7 @@ impl<'a: 'b, 'b> SendRoomMessageRequestBuilder<'a, 'b> { self.fbb_.push_slot::(SendRoomMessageRequest::VT_OPTION, option, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SendRoomMessageRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SendRoomMessageRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); SendRoomMessageRequestBuilder { fbb_: _fbb, @@ -5425,8 +5408,8 @@ impl<'a> RoomMessageInfo<'a> { RoomMessageInfo { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RoomMessageInfoArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RoomMessageInfoBuilder::new(_fbb); @@ -5461,11 +5444,11 @@ impl<'a> RoomMessageInfo<'a> { unsafe { self._tab.get::>>(RoomMessageInfo::VT_DST, None)} } #[inline] - pub fn srcMember(&self) -> Option> { + pub fn srcMember(&self) -> Option> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::>(RoomMessageInfo::VT_SRCMEMBER, None)} + unsafe { self._tab.get::>(RoomMessageInfo::VT_SRCMEMBER, None)} } #[inline] pub fn msg(&self) -> Option> { @@ -5486,7 +5469,7 @@ impl flatbuffers::Verifiable for RoomMessageInfo<'_> { .visit_field::("filtered", Self::VT_FILTERED, false)? .visit_field::("castType", Self::VT_CASTTYPE, false)? .visit_field::>>("dst", Self::VT_DST, false)? - .visit_field::>("srcMember", Self::VT_SRCMEMBER, false)? + .visit_field::>("srcMember", Self::VT_SRCMEMBER, false)? .visit_field::>>("msg", Self::VT_MSG, false)? .finish(); Ok(()) @@ -5496,7 +5479,7 @@ pub struct RoomMessageInfoArgs<'a> { pub filtered: bool, pub castType: u8, pub dst: Option>>, - pub srcMember: Option>>, + pub srcMember: Option>>, pub msg: Option>>, } impl<'a> Default for RoomMessageInfoArgs<'a> { @@ -5512,11 +5495,11 @@ impl<'a> Default for RoomMessageInfoArgs<'a> { } } -pub struct RoomMessageInfoBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RoomMessageInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RoomMessageInfoBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RoomMessageInfoBuilder<'a, 'b, A> { #[inline] pub fn add_filtered(&mut self, filtered: bool) { self.fbb_.push_slot::(RoomMessageInfo::VT_FILTERED, filtered, false); @@ -5530,15 +5513,15 @@ impl<'a: 'b, 'b> RoomMessageInfoBuilder<'a, 'b> { self.fbb_.push_slot_always::>(RoomMessageInfo::VT_DST, dst); } #[inline] - pub fn add_srcMember(&mut self, srcMember: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(RoomMessageInfo::VT_SRCMEMBER, srcMember); + pub fn add_srcMember(&mut self, srcMember: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(RoomMessageInfo::VT_SRCMEMBER, srcMember); } #[inline] pub fn add_msg(&mut self, msg: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(RoomMessageInfo::VT_MSG, msg); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RoomMessageInfoBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RoomMessageInfoBuilder<'a, 'b, A> { let start = _fbb.start_table(); RoomMessageInfoBuilder { fbb_: _fbb, @@ -5593,8 +5576,8 @@ impl<'a> MessageDetails<'a> { MessageDetails { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args MessageDetailsArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = MessageDetailsBuilder::new(_fbb); @@ -5713,11 +5696,11 @@ impl<'a> Default for MessageDetailsArgs<'a> { } } -pub struct MessageDetailsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct MessageDetailsBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> MessageDetailsBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MessageDetailsBuilder<'a, 'b, A> { #[inline] pub fn add_communicationId(&mut self, communicationId: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(MessageDetails::VT_COMMUNICATIONID, communicationId); @@ -5751,7 +5734,7 @@ impl<'a: 'b, 'b> MessageDetailsBuilder<'a, 'b> { self.fbb_.push_slot_always::>(MessageDetails::VT_DATA, data); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MessageDetailsBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MessageDetailsBuilder<'a, 'b, A> { let start = _fbb.start_table(); MessageDetailsBuilder { fbb_: _fbb, @@ -5803,8 +5786,8 @@ impl<'a> SendMessageRequest<'a> { SendMessageRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SendMessageRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SendMessageRequestBuilder::new(_fbb); @@ -5866,11 +5849,11 @@ impl<'a> Default for SendMessageRequestArgs<'a> { } } -pub struct SendMessageRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct SendMessageRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> SendMessageRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SendMessageRequestBuilder<'a, 'b, A> { #[inline] pub fn add_message(&mut self, message: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(SendMessageRequest::VT_MESSAGE, message); @@ -5880,7 +5863,7 @@ impl<'a: 'b, 'b> SendMessageRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(SendMessageRequest::VT_NPIDS, npids); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SendMessageRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SendMessageRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); SendMessageRequestBuilder { fbb_: _fbb, @@ -5929,8 +5912,8 @@ impl<'a> BoardInfo<'a> { BoardInfo { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args BoardInfoArgs ) -> flatbuffers::WIPOffset> { let mut builder = BoardInfoBuilder::new(_fbb); @@ -6016,11 +5999,11 @@ impl<'a> Default for BoardInfoArgs { } } -pub struct BoardInfoBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct BoardInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> BoardInfoBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BoardInfoBuilder<'a, 'b, A> { #[inline] pub fn add_rankLimit(&mut self, rankLimit: u32) { self.fbb_.push_slot::(BoardInfo::VT_RANKLIMIT, rankLimit, 0); @@ -6042,7 +6025,7 @@ impl<'a: 'b, 'b> BoardInfoBuilder<'a, 'b> { self.fbb_.push_slot::(BoardInfo::VT_UPLOADSIZELIMIT, uploadSizeLimit, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> BoardInfoBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BoardInfoBuilder<'a, 'b, A> { let start = _fbb.start_table(); BoardInfoBuilder { fbb_: _fbb, @@ -6094,8 +6077,8 @@ impl<'a> RecordScoreRequest<'a> { RecordScoreRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RecordScoreRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RecordScoreRequestBuilder::new(_fbb); @@ -6181,11 +6164,11 @@ impl<'a> Default for RecordScoreRequestArgs<'a> { } } -pub struct RecordScoreRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RecordScoreRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RecordScoreRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RecordScoreRequestBuilder<'a, 'b, A> { #[inline] pub fn add_boardId(&mut self, boardId: u32) { self.fbb_.push_slot::(RecordScoreRequest::VT_BOARDID, boardId, 0); @@ -6207,7 +6190,7 @@ impl<'a: 'b, 'b> RecordScoreRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(RecordScoreRequest::VT_DATA, data); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RecordScoreRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RecordScoreRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); RecordScoreRequestBuilder { fbb_: _fbb, @@ -6259,8 +6242,8 @@ impl<'a> GetScoreRangeRequest<'a> { GetScoreRangeRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetScoreRangeRequestArgs ) -> flatbuffers::WIPOffset> { let mut builder = GetScoreRangeRequestBuilder::new(_fbb); @@ -6346,11 +6329,11 @@ impl<'a> Default for GetScoreRangeRequestArgs { } } -pub struct GetScoreRangeRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct GetScoreRangeRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> GetScoreRangeRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetScoreRangeRequestBuilder<'a, 'b, A> { #[inline] pub fn add_boardId(&mut self, boardId: u32) { self.fbb_.push_slot::(GetScoreRangeRequest::VT_BOARDID, boardId, 0); @@ -6372,7 +6355,7 @@ impl<'a: 'b, 'b> GetScoreRangeRequestBuilder<'a, 'b> { self.fbb_.push_slot::(GetScoreRangeRequest::VT_WITHGAMEINFO, withGameInfo, false); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GetScoreRangeRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetScoreRangeRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetScoreRangeRequestBuilder { fbb_: _fbb, @@ -6421,8 +6404,8 @@ impl<'a> ScoreNpIdPcId<'a> { ScoreNpIdPcId { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ScoreNpIdPcIdArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = ScoreNpIdPcIdBuilder::new(_fbb); @@ -6475,11 +6458,11 @@ impl<'a> Default for ScoreNpIdPcIdArgs<'a> { } } -pub struct ScoreNpIdPcIdBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct ScoreNpIdPcIdBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> ScoreNpIdPcIdBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ScoreNpIdPcIdBuilder<'a, 'b, A> { #[inline] pub fn add_npid(&mut self, npid: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(ScoreNpIdPcId::VT_NPID, npid); @@ -6489,7 +6472,7 @@ impl<'a: 'b, 'b> ScoreNpIdPcIdBuilder<'a, 'b> { self.fbb_.push_slot::(ScoreNpIdPcId::VT_PCID, pcId, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ScoreNpIdPcIdBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ScoreNpIdPcIdBuilder<'a, 'b, A> { let start = _fbb.start_table(); ScoreNpIdPcIdBuilder { fbb_: _fbb, @@ -6537,8 +6520,8 @@ impl<'a> GetScoreNpIdRequest<'a> { GetScoreNpIdRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetScoreNpIdRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = GetScoreNpIdRequestBuilder::new(_fbb); @@ -6613,11 +6596,11 @@ impl<'a> Default for GetScoreNpIdRequestArgs<'a> { } } -pub struct GetScoreNpIdRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct GetScoreNpIdRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> GetScoreNpIdRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetScoreNpIdRequestBuilder<'a, 'b, A> { #[inline] pub fn add_boardId(&mut self, boardId: u32) { self.fbb_.push_slot::(GetScoreNpIdRequest::VT_BOARDID, boardId, 0); @@ -6635,7 +6618,7 @@ impl<'a: 'b, 'b> GetScoreNpIdRequestBuilder<'a, 'b> { self.fbb_.push_slot::(GetScoreNpIdRequest::VT_WITHGAMEINFO, withGameInfo, false); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GetScoreNpIdRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetScoreNpIdRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetScoreNpIdRequestBuilder { fbb_: _fbb, @@ -6686,8 +6669,8 @@ impl<'a> GetScoreFriendsRequest<'a> { GetScoreFriendsRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetScoreFriendsRequestArgs ) -> flatbuffers::WIPOffset> { let mut builder = GetScoreFriendsRequestBuilder::new(_fbb); @@ -6773,11 +6756,11 @@ impl<'a> Default for GetScoreFriendsRequestArgs { } } -pub struct GetScoreFriendsRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct GetScoreFriendsRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> GetScoreFriendsRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetScoreFriendsRequestBuilder<'a, 'b, A> { #[inline] pub fn add_boardId(&mut self, boardId: u32) { self.fbb_.push_slot::(GetScoreFriendsRequest::VT_BOARDID, boardId, 0); @@ -6799,7 +6782,7 @@ impl<'a: 'b, 'b> GetScoreFriendsRequestBuilder<'a, 'b> { self.fbb_.push_slot::(GetScoreFriendsRequest::VT_WITHGAMEINFO, withGameInfo, false); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GetScoreFriendsRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetScoreFriendsRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetScoreFriendsRequestBuilder { fbb_: _fbb, @@ -6853,8 +6836,8 @@ impl<'a> ScoreRankData<'a> { ScoreRankData { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ScoreRankDataArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = ScoreRankDataBuilder::new(_fbb); @@ -6962,11 +6945,11 @@ impl<'a> Default for ScoreRankDataArgs<'a> { } } -pub struct ScoreRankDataBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct ScoreRankDataBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> ScoreRankDataBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ScoreRankDataBuilder<'a, 'b, A> { #[inline] pub fn add_npId(&mut self, npId: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(ScoreRankData::VT_NPID, npId); @@ -6996,7 +6979,7 @@ impl<'a: 'b, 'b> ScoreRankDataBuilder<'a, 'b> { self.fbb_.push_slot::(ScoreRankData::VT_RECORDDATE, recordDate, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ScoreRankDataBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ScoreRankDataBuilder<'a, 'b, A> { let start = _fbb.start_table(); ScoreRankDataBuilder { fbb_: _fbb, @@ -7046,8 +7029,8 @@ impl<'a> ScoreInfo<'a> { ScoreInfo { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ScoreInfoArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = ScoreInfoBuilder::new(_fbb); @@ -7089,17 +7072,17 @@ impl<'a> Default for ScoreInfoArgs<'a> { } } -pub struct ScoreInfoBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct ScoreInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> ScoreInfoBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ScoreInfoBuilder<'a, 'b, A> { #[inline] pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(ScoreInfo::VT_DATA, data); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ScoreInfoBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ScoreInfoBuilder<'a, 'b, A> { let start = _fbb.start_table(); ScoreInfoBuilder { fbb_: _fbb, @@ -7147,8 +7130,8 @@ impl<'a> GetScoreResponse<'a> { GetScoreResponse { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetScoreResponseArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = GetScoreResponseBuilder::new(_fbb); @@ -7234,11 +7217,11 @@ impl<'a> Default for GetScoreResponseArgs<'a> { } } -pub struct GetScoreResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct GetScoreResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> GetScoreResponseBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetScoreResponseBuilder<'a, 'b, A> { #[inline] pub fn add_rankArray(&mut self, rankArray: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(GetScoreResponse::VT_RANKARRAY, rankArray); @@ -7260,7 +7243,7 @@ impl<'a: 'b, 'b> GetScoreResponseBuilder<'a, 'b> { self.fbb_.push_slot::(GetScoreResponse::VT_TOTALRECORD, totalRecord, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GetScoreResponseBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetScoreResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetScoreResponseBuilder { fbb_: _fbb, @@ -7310,8 +7293,8 @@ impl<'a> RecordScoreGameDataRequest<'a> { RecordScoreGameDataRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RecordScoreGameDataRequestArgs ) -> flatbuffers::WIPOffset> { let mut builder = RecordScoreGameDataRequestBuilder::new(_fbb); @@ -7375,11 +7358,11 @@ impl<'a> Default for RecordScoreGameDataRequestArgs { } } -pub struct RecordScoreGameDataRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RecordScoreGameDataRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RecordScoreGameDataRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RecordScoreGameDataRequestBuilder<'a, 'b, A> { #[inline] pub fn add_boardId(&mut self, boardId: u32) { self.fbb_.push_slot::(RecordScoreGameDataRequest::VT_BOARDID, boardId, 0); @@ -7393,7 +7376,7 @@ impl<'a: 'b, 'b> RecordScoreGameDataRequestBuilder<'a, 'b> { self.fbb_.push_slot::(RecordScoreGameDataRequest::VT_SCORE, score, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RecordScoreGameDataRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RecordScoreGameDataRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); RecordScoreGameDataRequestBuilder { fbb_: _fbb, @@ -7441,8 +7424,8 @@ impl<'a> GetScoreGameDataRequest<'a> { GetScoreGameDataRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetScoreGameDataRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = GetScoreGameDataRequestBuilder::new(_fbb); @@ -7506,11 +7489,11 @@ impl<'a> Default for GetScoreGameDataRequestArgs<'a> { } } -pub struct GetScoreGameDataRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct GetScoreGameDataRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> GetScoreGameDataRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetScoreGameDataRequestBuilder<'a, 'b, A> { #[inline] pub fn add_boardId(&mut self, boardId: u32) { self.fbb_.push_slot::(GetScoreGameDataRequest::VT_BOARDID, boardId, 0); @@ -7524,7 +7507,7 @@ impl<'a: 'b, 'b> GetScoreGameDataRequestBuilder<'a, 'b> { self.fbb_.push_slot::(GetScoreGameDataRequest::VT_PCID, pcId, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GetScoreGameDataRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetScoreGameDataRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetScoreGameDataRequestBuilder { fbb_: _fbb, @@ -7571,8 +7554,8 @@ impl<'a> TusUser<'a> { TusUser { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusUserArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusUserBuilder::new(_fbb); @@ -7625,11 +7608,11 @@ impl<'a> Default for TusUserArgs<'a> { } } -pub struct TusUserBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusUserBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusUserBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusUserBuilder<'a, 'b, A> { #[inline] pub fn add_vuser(&mut self, vuser: bool) { self.fbb_.push_slot::(TusUser::VT_VUSER, vuser, false); @@ -7639,7 +7622,7 @@ impl<'a: 'b, 'b> TusUserBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TusUser::VT_NPID, npid); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusUserBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusUserBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusUserBuilder { fbb_: _fbb, @@ -7689,8 +7672,8 @@ impl<'a> TusVariable<'a> { TusVariable { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusVariableArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusVariableBuilder::new(_fbb); @@ -7787,11 +7770,11 @@ impl<'a> Default for TusVariableArgs<'a> { } } -pub struct TusVariableBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusVariableBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusVariableBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusVariableBuilder<'a, 'b, A> { #[inline] pub fn add_ownerId(&mut self, ownerId: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(TusVariable::VT_OWNERID, ownerId); @@ -7817,7 +7800,7 @@ impl<'a: 'b, 'b> TusVariableBuilder<'a, 'b> { self.fbb_.push_slot::(TusVariable::VT_OLDVARIABLE, oldVariable, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusVariableBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusVariableBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusVariableBuilder { fbb_: _fbb, @@ -7866,8 +7849,8 @@ impl<'a> TusVarResponse<'a> { TusVarResponse { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusVarResponseArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusVarResponseBuilder::new(_fbb); @@ -7909,17 +7892,17 @@ impl<'a> Default for TusVarResponseArgs<'a> { } } -pub struct TusVarResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusVarResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusVarResponseBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusVarResponseBuilder<'a, 'b, A> { #[inline] pub fn add_vars(&mut self, vars: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(TusVarResponse::VT_VARS, vars); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusVarResponseBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusVarResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusVarResponseBuilder { fbb_: _fbb, @@ -7965,8 +7948,8 @@ impl<'a> TusSetMultiSlotVariableRequest<'a> { TusSetMultiSlotVariableRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusSetMultiSlotVariableRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusSetMultiSlotVariableRequestBuilder::new(_fbb); @@ -8030,11 +8013,11 @@ impl<'a> Default for TusSetMultiSlotVariableRequestArgs<'a> { } } -pub struct TusSetMultiSlotVariableRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusSetMultiSlotVariableRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusSetMultiSlotVariableRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusSetMultiSlotVariableRequestBuilder<'a, 'b, A> { #[inline] pub fn add_user(&mut self, user: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(TusSetMultiSlotVariableRequest::VT_USER, user); @@ -8048,7 +8031,7 @@ impl<'a: 'b, 'b> TusSetMultiSlotVariableRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TusSetMultiSlotVariableRequest::VT_VARIABLEARRAY, variableArray); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusSetMultiSlotVariableRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusSetMultiSlotVariableRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusSetMultiSlotVariableRequestBuilder { fbb_: _fbb, @@ -8095,8 +8078,8 @@ impl<'a> TusGetMultiSlotVariableRequest<'a> { TusGetMultiSlotVariableRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusGetMultiSlotVariableRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusGetMultiSlotVariableRequestBuilder::new(_fbb); @@ -8149,11 +8132,11 @@ impl<'a> Default for TusGetMultiSlotVariableRequestArgs<'a> { } } -pub struct TusGetMultiSlotVariableRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusGetMultiSlotVariableRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusGetMultiSlotVariableRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusGetMultiSlotVariableRequestBuilder<'a, 'b, A> { #[inline] pub fn add_user(&mut self, user: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(TusGetMultiSlotVariableRequest::VT_USER, user); @@ -8163,7 +8146,7 @@ impl<'a: 'b, 'b> TusGetMultiSlotVariableRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TusGetMultiSlotVariableRequest::VT_SLOTIDARRAY, slotIdArray); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusGetMultiSlotVariableRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusGetMultiSlotVariableRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusGetMultiSlotVariableRequestBuilder { fbb_: _fbb, @@ -8209,8 +8192,8 @@ impl<'a> TusGetMultiUserVariableRequest<'a> { TusGetMultiUserVariableRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusGetMultiUserVariableRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusGetMultiUserVariableRequestBuilder::new(_fbb); @@ -8263,11 +8246,11 @@ impl<'a> Default for TusGetMultiUserVariableRequestArgs<'a> { } } -pub struct TusGetMultiUserVariableRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusGetMultiUserVariableRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusGetMultiUserVariableRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusGetMultiUserVariableRequestBuilder<'a, 'b, A> { #[inline] pub fn add_users(&mut self, users: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(TusGetMultiUserVariableRequest::VT_USERS, users); @@ -8277,7 +8260,7 @@ impl<'a: 'b, 'b> TusGetMultiUserVariableRequestBuilder<'a, 'b> { self.fbb_.push_slot::(TusGetMultiUserVariableRequest::VT_SLOTID, slotId, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusGetMultiUserVariableRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusGetMultiUserVariableRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusGetMultiUserVariableRequestBuilder { fbb_: _fbb, @@ -8325,8 +8308,8 @@ impl<'a> TusGetFriendsVariableRequest<'a> { TusGetFriendsVariableRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusGetFriendsVariableRequestArgs ) -> flatbuffers::WIPOffset> { let mut builder = TusGetFriendsVariableRequestBuilder::new(_fbb); @@ -8401,11 +8384,11 @@ impl<'a> Default for TusGetFriendsVariableRequestArgs { } } -pub struct TusGetFriendsVariableRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusGetFriendsVariableRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusGetFriendsVariableRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusGetFriendsVariableRequestBuilder<'a, 'b, A> { #[inline] pub fn add_slotId(&mut self, slotId: i32) { self.fbb_.push_slot::(TusGetFriendsVariableRequest::VT_SLOTID, slotId, 0); @@ -8423,7 +8406,7 @@ impl<'a: 'b, 'b> TusGetFriendsVariableRequestBuilder<'a, 'b> { self.fbb_.push_slot::(TusGetFriendsVariableRequest::VT_ARRAYNUM, arrayNum, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusGetFriendsVariableRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusGetFriendsVariableRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusGetFriendsVariableRequestBuilder { fbb_: _fbb, @@ -8474,8 +8457,8 @@ impl<'a> TusAddAndGetVariableRequest<'a> { TusAddAndGetVariableRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusAddAndGetVariableRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusAddAndGetVariableRequestBuilder::new(_fbb); @@ -8561,11 +8544,11 @@ impl<'a> Default for TusAddAndGetVariableRequestArgs<'a> { } } -pub struct TusAddAndGetVariableRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusAddAndGetVariableRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusAddAndGetVariableRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusAddAndGetVariableRequestBuilder<'a, 'b, A> { #[inline] pub fn add_user(&mut self, user: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(TusAddAndGetVariableRequest::VT_USER, user); @@ -8587,7 +8570,7 @@ impl<'a: 'b, 'b> TusAddAndGetVariableRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TusAddAndGetVariableRequest::VT_ISLASTCHANGEDAUTHORID, isLastChangedAuthorId); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusAddAndGetVariableRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusAddAndGetVariableRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusAddAndGetVariableRequestBuilder { fbb_: _fbb, @@ -8641,8 +8624,8 @@ impl<'a> TusTryAndSetVariableRequest<'a> { TusTryAndSetVariableRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusTryAndSetVariableRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusTryAndSetVariableRequestBuilder::new(_fbb); @@ -8750,11 +8733,11 @@ impl<'a> Default for TusTryAndSetVariableRequestArgs<'a> { } } -pub struct TusTryAndSetVariableRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusTryAndSetVariableRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusTryAndSetVariableRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusTryAndSetVariableRequestBuilder<'a, 'b, A> { #[inline] pub fn add_user(&mut self, user: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(TusTryAndSetVariableRequest::VT_USER, user); @@ -8784,7 +8767,7 @@ impl<'a: 'b, 'b> TusTryAndSetVariableRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TusTryAndSetVariableRequest::VT_COMPAREVALUE, compareValue); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusTryAndSetVariableRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusTryAndSetVariableRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusTryAndSetVariableRequestBuilder { fbb_: _fbb, @@ -8835,8 +8818,8 @@ impl<'a> TusDeleteMultiSlotVariableRequest<'a> { TusDeleteMultiSlotVariableRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusDeleteMultiSlotVariableRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusDeleteMultiSlotVariableRequestBuilder::new(_fbb); @@ -8889,11 +8872,11 @@ impl<'a> Default for TusDeleteMultiSlotVariableRequestArgs<'a> { } } -pub struct TusDeleteMultiSlotVariableRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusDeleteMultiSlotVariableRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusDeleteMultiSlotVariableRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusDeleteMultiSlotVariableRequestBuilder<'a, 'b, A> { #[inline] pub fn add_user(&mut self, user: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(TusDeleteMultiSlotVariableRequest::VT_USER, user); @@ -8903,7 +8886,7 @@ impl<'a: 'b, 'b> TusDeleteMultiSlotVariableRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TusDeleteMultiSlotVariableRequest::VT_SLOTIDARRAY, slotIdArray); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusDeleteMultiSlotVariableRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusDeleteMultiSlotVariableRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusDeleteMultiSlotVariableRequestBuilder { fbb_: _fbb, @@ -8953,8 +8936,8 @@ impl<'a> TusSetDataRequest<'a> { TusSetDataRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusSetDataRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusSetDataRequestBuilder::new(_fbb); @@ -9051,11 +9034,11 @@ impl<'a> Default for TusSetDataRequestArgs<'a> { } } -pub struct TusSetDataRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusSetDataRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusSetDataRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusSetDataRequestBuilder<'a, 'b, A> { #[inline] pub fn add_user(&mut self, user: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(TusSetDataRequest::VT_USER, user); @@ -9081,7 +9064,7 @@ impl<'a: 'b, 'b> TusSetDataRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TusSetDataRequest::VT_ISLASTCHANGEDAUTHORID, isLastChangedAuthorId); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusSetDataRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusSetDataRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusSetDataRequestBuilder { fbb_: _fbb, @@ -9134,8 +9117,8 @@ impl<'a> TusDataStatus<'a> { TusDataStatus { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusDataStatusArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusDataStatusBuilder::new(_fbb); @@ -9221,11 +9204,11 @@ impl<'a> Default for TusDataStatusArgs<'a> { } } -pub struct TusDataStatusBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusDataStatusBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusDataStatusBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusDataStatusBuilder<'a, 'b, A> { #[inline] pub fn add_ownerId(&mut self, ownerId: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(TusDataStatus::VT_OWNERID, ownerId); @@ -9247,7 +9230,7 @@ impl<'a: 'b, 'b> TusDataStatusBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TusDataStatus::VT_INFO, info); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusDataStatusBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusDataStatusBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusDataStatusBuilder { fbb_: _fbb, @@ -9296,8 +9279,8 @@ impl<'a> TusData<'a> { TusData { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusDataArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusDataBuilder::new(_fbb); @@ -9350,11 +9333,11 @@ impl<'a> Default for TusDataArgs<'a> { } } -pub struct TusDataBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusDataBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusDataBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusDataBuilder<'a, 'b, A> { #[inline] pub fn add_status(&mut self, status: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(TusData::VT_STATUS, status); @@ -9364,7 +9347,7 @@ impl<'a: 'b, 'b> TusDataBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TusData::VT_DATA, data); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusDataBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusDataBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusDataBuilder { fbb_: _fbb, @@ -9409,8 +9392,8 @@ impl<'a> TusDataStatusResponse<'a> { TusDataStatusResponse { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusDataStatusResponseArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusDataStatusResponseBuilder::new(_fbb); @@ -9452,17 +9435,17 @@ impl<'a> Default for TusDataStatusResponseArgs<'a> { } } -pub struct TusDataStatusResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusDataStatusResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusDataStatusResponseBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusDataStatusResponseBuilder<'a, 'b, A> { #[inline] pub fn add_status(&mut self, status: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(TusDataStatusResponse::VT_STATUS, status); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusDataStatusResponseBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusDataStatusResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusDataStatusResponseBuilder { fbb_: _fbb, @@ -9507,8 +9490,8 @@ impl<'a> TusGetDataRequest<'a> { TusGetDataRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusGetDataRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusGetDataRequestBuilder::new(_fbb); @@ -9561,11 +9544,11 @@ impl<'a> Default for TusGetDataRequestArgs<'a> { } } -pub struct TusGetDataRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusGetDataRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusGetDataRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusGetDataRequestBuilder<'a, 'b, A> { #[inline] pub fn add_user(&mut self, user: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(TusGetDataRequest::VT_USER, user); @@ -9575,7 +9558,7 @@ impl<'a: 'b, 'b> TusGetDataRequestBuilder<'a, 'b> { self.fbb_.push_slot::(TusGetDataRequest::VT_SLOTID, slotId, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusGetDataRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusGetDataRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusGetDataRequestBuilder { fbb_: _fbb, @@ -9621,8 +9604,8 @@ impl<'a> TusGetMultiSlotDataStatusRequest<'a> { TusGetMultiSlotDataStatusRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusGetMultiSlotDataStatusRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusGetMultiSlotDataStatusRequestBuilder::new(_fbb); @@ -9675,11 +9658,11 @@ impl<'a> Default for TusGetMultiSlotDataStatusRequestArgs<'a> { } } -pub struct TusGetMultiSlotDataStatusRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusGetMultiSlotDataStatusRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusGetMultiSlotDataStatusRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusGetMultiSlotDataStatusRequestBuilder<'a, 'b, A> { #[inline] pub fn add_user(&mut self, user: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(TusGetMultiSlotDataStatusRequest::VT_USER, user); @@ -9689,7 +9672,7 @@ impl<'a: 'b, 'b> TusGetMultiSlotDataStatusRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TusGetMultiSlotDataStatusRequest::VT_SLOTIDARRAY, slotIdArray); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusGetMultiSlotDataStatusRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusGetMultiSlotDataStatusRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusGetMultiSlotDataStatusRequestBuilder { fbb_: _fbb, @@ -9735,8 +9718,8 @@ impl<'a> TusGetMultiUserDataStatusRequest<'a> { TusGetMultiUserDataStatusRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusGetMultiUserDataStatusRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusGetMultiUserDataStatusRequestBuilder::new(_fbb); @@ -9789,11 +9772,11 @@ impl<'a> Default for TusGetMultiUserDataStatusRequestArgs<'a> { } } -pub struct TusGetMultiUserDataStatusRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusGetMultiUserDataStatusRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusGetMultiUserDataStatusRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusGetMultiUserDataStatusRequestBuilder<'a, 'b, A> { #[inline] pub fn add_users(&mut self, users: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(TusGetMultiUserDataStatusRequest::VT_USERS, users); @@ -9803,7 +9786,7 @@ impl<'a: 'b, 'b> TusGetMultiUserDataStatusRequestBuilder<'a, 'b> { self.fbb_.push_slot::(TusGetMultiUserDataStatusRequest::VT_SLOTID, slotId, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusGetMultiUserDataStatusRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusGetMultiUserDataStatusRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusGetMultiUserDataStatusRequestBuilder { fbb_: _fbb, @@ -9851,8 +9834,8 @@ impl<'a> TusGetFriendsDataStatusRequest<'a> { TusGetFriendsDataStatusRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusGetFriendsDataStatusRequestArgs ) -> flatbuffers::WIPOffset> { let mut builder = TusGetFriendsDataStatusRequestBuilder::new(_fbb); @@ -9927,11 +9910,11 @@ impl<'a> Default for TusGetFriendsDataStatusRequestArgs { } } -pub struct TusGetFriendsDataStatusRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusGetFriendsDataStatusRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusGetFriendsDataStatusRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusGetFriendsDataStatusRequestBuilder<'a, 'b, A> { #[inline] pub fn add_slotId(&mut self, slotId: i32) { self.fbb_.push_slot::(TusGetFriendsDataStatusRequest::VT_SLOTID, slotId, 0); @@ -9949,7 +9932,7 @@ impl<'a: 'b, 'b> TusGetFriendsDataStatusRequestBuilder<'a, 'b> { self.fbb_.push_slot::(TusGetFriendsDataStatusRequest::VT_ARRAYNUM, arrayNum, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusGetFriendsDataStatusRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusGetFriendsDataStatusRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusGetFriendsDataStatusRequestBuilder { fbb_: _fbb, @@ -9997,8 +9980,8 @@ impl<'a> TusDeleteMultiSlotDataRequest<'a> { TusDeleteMultiSlotDataRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args TusDeleteMultiSlotDataRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TusDeleteMultiSlotDataRequestBuilder::new(_fbb); @@ -10051,11 +10034,11 @@ impl<'a> Default for TusDeleteMultiSlotDataRequestArgs<'a> { } } -pub struct TusDeleteMultiSlotDataRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TusDeleteMultiSlotDataRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TusDeleteMultiSlotDataRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TusDeleteMultiSlotDataRequestBuilder<'a, 'b, A> { #[inline] pub fn add_user(&mut self, user: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(TusDeleteMultiSlotDataRequest::VT_USER, user); @@ -10065,7 +10048,7 @@ impl<'a: 'b, 'b> TusDeleteMultiSlotDataRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TusDeleteMultiSlotDataRequest::VT_SLOTIDARRAY, slotIdArray); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TusDeleteMultiSlotDataRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TusDeleteMultiSlotDataRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); TusDeleteMultiSlotDataRequestBuilder { fbb_: _fbb, @@ -10113,8 +10096,8 @@ impl<'a> SetPresenceRequest<'a> { SetPresenceRequest { _tab: table } } #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SetPresenceRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SetPresenceRequestBuilder::new(_fbb); @@ -10189,11 +10172,11 @@ impl<'a> Default for SetPresenceRequestArgs<'a> { } } -pub struct SetPresenceRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct SetPresenceRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> SetPresenceRequestBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SetPresenceRequestBuilder<'a, 'b, A> { #[inline] pub fn add_title(&mut self, title: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(SetPresenceRequest::VT_TITLE, title); @@ -10211,7 +10194,7 @@ impl<'a: 'b, 'b> SetPresenceRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(SetPresenceRequest::VT_DATA, data); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SetPresenceRequestBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SetPresenceRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); SetPresenceRequestBuilder { fbb_: _fbb, @@ -10235,3 +10218,1672 @@ impl core::fmt::Debug for SetPresenceRequest<'_> { ds.finish() } } +pub enum MatchingSearchConditionOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct MatchingSearchCondition<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for MatchingSearchCondition<'a> { + type Inner = MatchingSearchCondition<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> MatchingSearchCondition<'a> { + pub const VT_ATTR_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_ATTR_ID: flatbuffers::VOffsetT = 6; + pub const VT_COMP_OP: flatbuffers::VOffsetT = 8; + pub const VT_COMP_VALUE: flatbuffers::VOffsetT = 10; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MatchingSearchCondition { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args MatchingSearchConditionArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = MatchingSearchConditionBuilder::new(_fbb); + builder.add_comp_value(args.comp_value); + builder.add_comp_op(args.comp_op); + builder.add_attr_id(args.attr_id); + builder.add_attr_type(args.attr_type); + builder.finish() + } + + + #[inline] + pub fn attr_type(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(MatchingSearchCondition::VT_ATTR_TYPE, Some(0)).unwrap()} + } + #[inline] + pub fn attr_id(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(MatchingSearchCondition::VT_ATTR_ID, Some(0)).unwrap()} + } + #[inline] + pub fn comp_op(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(MatchingSearchCondition::VT_COMP_OP, Some(0)).unwrap()} + } + #[inline] + pub fn comp_value(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(MatchingSearchCondition::VT_COMP_VALUE, Some(0)).unwrap()} + } +} + +impl flatbuffers::Verifiable for MatchingSearchCondition<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("attr_type", Self::VT_ATTR_TYPE, false)? + .visit_field::("attr_id", Self::VT_ATTR_ID, false)? + .visit_field::("comp_op", Self::VT_COMP_OP, false)? + .visit_field::("comp_value", Self::VT_COMP_VALUE, false)? + .finish(); + Ok(()) + } +} +pub struct MatchingSearchConditionArgs { + pub attr_type: u32, + pub attr_id: u32, + pub comp_op: u32, + pub comp_value: u32, +} +impl<'a> Default for MatchingSearchConditionArgs { + #[inline] + fn default() -> Self { + MatchingSearchConditionArgs { + attr_type: 0, + attr_id: 0, + comp_op: 0, + comp_value: 0, + } + } +} + +pub struct MatchingSearchConditionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MatchingSearchConditionBuilder<'a, 'b, A> { + #[inline] + pub fn add_attr_type(&mut self, attr_type: u32) { + self.fbb_.push_slot::(MatchingSearchCondition::VT_ATTR_TYPE, attr_type, 0); + } + #[inline] + pub fn add_attr_id(&mut self, attr_id: u32) { + self.fbb_.push_slot::(MatchingSearchCondition::VT_ATTR_ID, attr_id, 0); + } + #[inline] + pub fn add_comp_op(&mut self, comp_op: u32) { + self.fbb_.push_slot::(MatchingSearchCondition::VT_COMP_OP, comp_op, 0); + } + #[inline] + pub fn add_comp_value(&mut self, comp_value: u32) { + self.fbb_.push_slot::(MatchingSearchCondition::VT_COMP_VALUE, comp_value, 0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MatchingSearchConditionBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + MatchingSearchConditionBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for MatchingSearchCondition<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MatchingSearchCondition"); + ds.field("attr_type", &self.attr_type()); + ds.field("attr_id", &self.attr_id()); + ds.field("comp_op", &self.comp_op()); + ds.field("comp_value", &self.comp_value()); + ds.finish() + } +} +pub enum MatchingAttrOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct MatchingAttr<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for MatchingAttr<'a> { + type Inner = MatchingAttr<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> MatchingAttr<'a> { + pub const VT_ATTR_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_ATTR_ID: flatbuffers::VOffsetT = 6; + pub const VT_NUM: flatbuffers::VOffsetT = 8; + pub const VT_DATA: flatbuffers::VOffsetT = 10; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MatchingAttr { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args MatchingAttrArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = MatchingAttrBuilder::new(_fbb); + if let Some(x) = args.data { builder.add_data(x); } + builder.add_num(args.num); + builder.add_attr_id(args.attr_id); + builder.add_attr_type(args.attr_type); + builder.finish() + } + + + #[inline] + pub fn attr_type(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(MatchingAttr::VT_ATTR_TYPE, Some(0)).unwrap()} + } + #[inline] + pub fn attr_id(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(MatchingAttr::VT_ATTR_ID, Some(0)).unwrap()} + } + #[inline] + pub fn num(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(MatchingAttr::VT_NUM, Some(0)).unwrap()} + } + #[inline] + pub fn data(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(MatchingAttr::VT_DATA, None)} + } +} + +impl flatbuffers::Verifiable for MatchingAttr<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("attr_type", Self::VT_ATTR_TYPE, false)? + .visit_field::("attr_id", Self::VT_ATTR_ID, false)? + .visit_field::("num", Self::VT_NUM, false)? + .visit_field::>>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } +} +pub struct MatchingAttrArgs<'a> { + pub attr_type: u32, + pub attr_id: u32, + pub num: u32, + pub data: Option>>, +} +impl<'a> Default for MatchingAttrArgs<'a> { + #[inline] + fn default() -> Self { + MatchingAttrArgs { + attr_type: 0, + attr_id: 0, + num: 0, + data: None, + } + } +} + +pub struct MatchingAttrBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MatchingAttrBuilder<'a, 'b, A> { + #[inline] + pub fn add_attr_type(&mut self, attr_type: u32) { + self.fbb_.push_slot::(MatchingAttr::VT_ATTR_TYPE, attr_type, 0); + } + #[inline] + pub fn add_attr_id(&mut self, attr_id: u32) { + self.fbb_.push_slot::(MatchingAttr::VT_ATTR_ID, attr_id, 0); + } + #[inline] + pub fn add_num(&mut self, num: u32) { + self.fbb_.push_slot::(MatchingAttr::VT_NUM, num, 0); + } + #[inline] + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(MatchingAttr::VT_DATA, data); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MatchingAttrBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + MatchingAttrBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for MatchingAttr<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MatchingAttr"); + ds.field("attr_type", &self.attr_type()); + ds.field("attr_id", &self.attr_id()); + ds.field("num", &self.num()); + ds.field("data", &self.data()); + ds.finish() + } +} +pub enum CreateRoomGUIRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct CreateRoomGUIRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for CreateRoomGUIRequest<'a> { + type Inner = CreateRoomGUIRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> CreateRoomGUIRequest<'a> { + pub const VT_TOTAL_SLOTS: flatbuffers::VOffsetT = 4; + pub const VT_PRIVATE_SLOTS: flatbuffers::VOffsetT = 6; + pub const VT_PRIVILEGE_GRANT: flatbuffers::VOffsetT = 8; + pub const VT_STEALTH: flatbuffers::VOffsetT = 10; + pub const VT_GAME_ATTRS: flatbuffers::VOffsetT = 12; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + CreateRoomGUIRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args CreateRoomGUIRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = CreateRoomGUIRequestBuilder::new(_fbb); + if let Some(x) = args.game_attrs { builder.add_game_attrs(x); } + builder.add_private_slots(args.private_slots); + builder.add_total_slots(args.total_slots); + builder.add_stealth(args.stealth); + builder.add_privilege_grant(args.privilege_grant); + builder.finish() + } + + + #[inline] + pub fn total_slots(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(CreateRoomGUIRequest::VT_TOTAL_SLOTS, Some(0)).unwrap()} + } + #[inline] + pub fn private_slots(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(CreateRoomGUIRequest::VT_PRIVATE_SLOTS, Some(0)).unwrap()} + } + #[inline] + pub fn privilege_grant(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(CreateRoomGUIRequest::VT_PRIVILEGE_GRANT, Some(false)).unwrap()} + } + #[inline] + pub fn stealth(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(CreateRoomGUIRequest::VT_STEALTH, Some(false)).unwrap()} + } + #[inline] + pub fn game_attrs(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(CreateRoomGUIRequest::VT_GAME_ATTRS, None)} + } +} + +impl flatbuffers::Verifiable for CreateRoomGUIRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("total_slots", Self::VT_TOTAL_SLOTS, false)? + .visit_field::("private_slots", Self::VT_PRIVATE_SLOTS, false)? + .visit_field::("privilege_grant", Self::VT_PRIVILEGE_GRANT, false)? + .visit_field::("stealth", Self::VT_STEALTH, false)? + .visit_field::>>>("game_attrs", Self::VT_GAME_ATTRS, false)? + .finish(); + Ok(()) + } +} +pub struct CreateRoomGUIRequestArgs<'a> { + pub total_slots: u32, + pub private_slots: u32, + pub privilege_grant: bool, + pub stealth: bool, + pub game_attrs: Option>>>>, +} +impl<'a> Default for CreateRoomGUIRequestArgs<'a> { + #[inline] + fn default() -> Self { + CreateRoomGUIRequestArgs { + total_slots: 0, + private_slots: 0, + privilege_grant: false, + stealth: false, + game_attrs: None, + } + } +} + +pub struct CreateRoomGUIRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CreateRoomGUIRequestBuilder<'a, 'b, A> { + #[inline] + pub fn add_total_slots(&mut self, total_slots: u32) { + self.fbb_.push_slot::(CreateRoomGUIRequest::VT_TOTAL_SLOTS, total_slots, 0); + } + #[inline] + pub fn add_private_slots(&mut self, private_slots: u32) { + self.fbb_.push_slot::(CreateRoomGUIRequest::VT_PRIVATE_SLOTS, private_slots, 0); + } + #[inline] + pub fn add_privilege_grant(&mut self, privilege_grant: bool) { + self.fbb_.push_slot::(CreateRoomGUIRequest::VT_PRIVILEGE_GRANT, privilege_grant, false); + } + #[inline] + pub fn add_stealth(&mut self, stealth: bool) { + self.fbb_.push_slot::(CreateRoomGUIRequest::VT_STEALTH, stealth, false); + } + #[inline] + pub fn add_game_attrs(&mut self, game_attrs: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(CreateRoomGUIRequest::VT_GAME_ATTRS, game_attrs); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CreateRoomGUIRequestBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + CreateRoomGUIRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for CreateRoomGUIRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("CreateRoomGUIRequest"); + ds.field("total_slots", &self.total_slots()); + ds.field("private_slots", &self.private_slots()); + ds.field("privilege_grant", &self.privilege_grant()); + ds.field("stealth", &self.stealth()); + ds.field("game_attrs", &self.game_attrs()); + ds.finish() + } +} +pub enum GUIUserInfoOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct GUIUserInfo<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for GUIUserInfo<'a> { + type Inner = GUIUserInfo<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> GUIUserInfo<'a> { + pub const VT_INFO: flatbuffers::VOffsetT = 4; + pub const VT_OWNER: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + GUIUserInfo { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args GUIUserInfoArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = GUIUserInfoBuilder::new(_fbb); + if let Some(x) = args.info { builder.add_info(x); } + builder.add_owner(args.owner); + builder.finish() + } + + + #[inline] + pub fn info(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(GUIUserInfo::VT_INFO, None)} + } + #[inline] + pub fn owner(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(GUIUserInfo::VT_OWNER, Some(false)).unwrap()} + } +} + +impl flatbuffers::Verifiable for GUIUserInfo<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("info", Self::VT_INFO, false)? + .visit_field::("owner", Self::VT_OWNER, false)? + .finish(); + Ok(()) + } +} +pub struct GUIUserInfoArgs<'a> { + pub info: Option>>, + pub owner: bool, +} +impl<'a> Default for GUIUserInfoArgs<'a> { + #[inline] + fn default() -> Self { + GUIUserInfoArgs { + info: None, + owner: false, + } + } +} + +pub struct GUIUserInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GUIUserInfoBuilder<'a, 'b, A> { + #[inline] + pub fn add_info(&mut self, info: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(GUIUserInfo::VT_INFO, info); + } + #[inline] + pub fn add_owner(&mut self, owner: bool) { + self.fbb_.push_slot::(GUIUserInfo::VT_OWNER, owner, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GUIUserInfoBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + GUIUserInfoBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for GUIUserInfo<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("GUIUserInfo"); + ds.field("info", &self.info()); + ds.field("owner", &self.owner()); + ds.finish() + } +} +pub enum MatchingRoomStatusOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct MatchingRoomStatus<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for MatchingRoomStatus<'a> { + type Inner = MatchingRoomStatus<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> MatchingRoomStatus<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_MEMBERS: flatbuffers::VOffsetT = 6; + pub const VT_KICK_ACTOR: flatbuffers::VOffsetT = 8; + pub const VT_OPT: flatbuffers::VOffsetT = 10; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MatchingRoomStatus { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args MatchingRoomStatusArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = MatchingRoomStatusBuilder::new(_fbb); + if let Some(x) = args.opt { builder.add_opt(x); } + if let Some(x) = args.kick_actor { builder.add_kick_actor(x); } + if let Some(x) = args.members { builder.add_members(x); } + if let Some(x) = args.id { builder.add_id(x); } + builder.finish() + } + + + #[inline] + pub fn id(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(MatchingRoomStatus::VT_ID, None)} + } + #[inline] + pub fn members(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(MatchingRoomStatus::VT_MEMBERS, None)} + } + #[inline] + pub fn kick_actor(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(MatchingRoomStatus::VT_KICK_ACTOR, None)} + } + #[inline] + pub fn opt(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(MatchingRoomStatus::VT_OPT, None)} + } +} + +impl flatbuffers::Verifiable for MatchingRoomStatus<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>("id", Self::VT_ID, false)? + .visit_field::>>>("members", Self::VT_MEMBERS, false)? + .visit_field::>("kick_actor", Self::VT_KICK_ACTOR, false)? + .visit_field::>>("opt", Self::VT_OPT, false)? + .finish(); + Ok(()) + } +} +pub struct MatchingRoomStatusArgs<'a> { + pub id: Option>>, + pub members: Option>>>>, + pub kick_actor: Option>, + pub opt: Option>>, +} +impl<'a> Default for MatchingRoomStatusArgs<'a> { + #[inline] + fn default() -> Self { + MatchingRoomStatusArgs { + id: None, + members: None, + kick_actor: None, + opt: None, + } + } +} + +pub struct MatchingRoomStatusBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MatchingRoomStatusBuilder<'a, 'b, A> { + #[inline] + pub fn add_id(&mut self, id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(MatchingRoomStatus::VT_ID, id); + } + #[inline] + pub fn add_members(&mut self, members: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(MatchingRoomStatus::VT_MEMBERS, members); + } + #[inline] + pub fn add_kick_actor(&mut self, kick_actor: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(MatchingRoomStatus::VT_KICK_ACTOR, kick_actor); + } + #[inline] + pub fn add_opt(&mut self, opt: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(MatchingRoomStatus::VT_OPT, opt); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MatchingRoomStatusBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + MatchingRoomStatusBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for MatchingRoomStatus<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MatchingRoomStatus"); + ds.field("id", &self.id()); + ds.field("members", &self.members()); + ds.field("kick_actor", &self.kick_actor()); + ds.field("opt", &self.opt()); + ds.finish() + } +} +pub enum GetRoomListGUIRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct GetRoomListGUIRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for GetRoomListGUIRequest<'a> { + type Inner = GetRoomListGUIRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> GetRoomListGUIRequest<'a> { + pub const VT_RANGE_START: flatbuffers::VOffsetT = 4; + pub const VT_RANGE_MAX: flatbuffers::VOffsetT = 6; + pub const VT_CONDS: flatbuffers::VOffsetT = 8; + pub const VT_ATTRS: flatbuffers::VOffsetT = 10; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + GetRoomListGUIRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args GetRoomListGUIRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = GetRoomListGUIRequestBuilder::new(_fbb); + if let Some(x) = args.attrs { builder.add_attrs(x); } + if let Some(x) = args.conds { builder.add_conds(x); } + builder.add_range_max(args.range_max); + builder.add_range_start(args.range_start); + builder.finish() + } + + + #[inline] + pub fn range_start(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(GetRoomListGUIRequest::VT_RANGE_START, Some(0)).unwrap()} + } + #[inline] + pub fn range_max(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(GetRoomListGUIRequest::VT_RANGE_MAX, Some(0)).unwrap()} + } + #[inline] + pub fn conds(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(GetRoomListGUIRequest::VT_CONDS, None)} + } + #[inline] + pub fn attrs(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(GetRoomListGUIRequest::VT_ATTRS, None)} + } +} + +impl flatbuffers::Verifiable for GetRoomListGUIRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("range_start", Self::VT_RANGE_START, false)? + .visit_field::("range_max", Self::VT_RANGE_MAX, false)? + .visit_field::>>>("conds", Self::VT_CONDS, false)? + .visit_field::>>>("attrs", Self::VT_ATTRS, false)? + .finish(); + Ok(()) + } +} +pub struct GetRoomListGUIRequestArgs<'a> { + pub range_start: u32, + pub range_max: u32, + pub conds: Option>>>>, + pub attrs: Option>>>>, +} +impl<'a> Default for GetRoomListGUIRequestArgs<'a> { + #[inline] + fn default() -> Self { + GetRoomListGUIRequestArgs { + range_start: 0, + range_max: 0, + conds: None, + attrs: None, + } + } +} + +pub struct GetRoomListGUIRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetRoomListGUIRequestBuilder<'a, 'b, A> { + #[inline] + pub fn add_range_start(&mut self, range_start: u32) { + self.fbb_.push_slot::(GetRoomListGUIRequest::VT_RANGE_START, range_start, 0); + } + #[inline] + pub fn add_range_max(&mut self, range_max: u32) { + self.fbb_.push_slot::(GetRoomListGUIRequest::VT_RANGE_MAX, range_max, 0); + } + #[inline] + pub fn add_conds(&mut self, conds: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(GetRoomListGUIRequest::VT_CONDS, conds); + } + #[inline] + pub fn add_attrs(&mut self, attrs: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(GetRoomListGUIRequest::VT_ATTRS, attrs); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetRoomListGUIRequestBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + GetRoomListGUIRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for GetRoomListGUIRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("GetRoomListGUIRequest"); + ds.field("range_start", &self.range_start()); + ds.field("range_max", &self.range_max()); + ds.field("conds", &self.conds()); + ds.field("attrs", &self.attrs()); + ds.finish() + } +} +pub enum MatchingRoomOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct MatchingRoom<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for MatchingRoom<'a> { + type Inner = MatchingRoom<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> MatchingRoom<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_ATTR: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MatchingRoom { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args MatchingRoomArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = MatchingRoomBuilder::new(_fbb); + if let Some(x) = args.attr { builder.add_attr(x); } + if let Some(x) = args.id { builder.add_id(x); } + builder.finish() + } + + + #[inline] + pub fn id(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(MatchingRoom::VT_ID, None)} + } + #[inline] + pub fn attr(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(MatchingRoom::VT_ATTR, None)} + } +} + +impl flatbuffers::Verifiable for MatchingRoom<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>("id", Self::VT_ID, false)? + .visit_field::>>>("attr", Self::VT_ATTR, false)? + .finish(); + Ok(()) + } +} +pub struct MatchingRoomArgs<'a> { + pub id: Option>>, + pub attr: Option>>>>, +} +impl<'a> Default for MatchingRoomArgs<'a> { + #[inline] + fn default() -> Self { + MatchingRoomArgs { + id: None, + attr: None, + } + } +} + +pub struct MatchingRoomBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MatchingRoomBuilder<'a, 'b, A> { + #[inline] + pub fn add_id(&mut self, id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(MatchingRoom::VT_ID, id); + } + #[inline] + pub fn add_attr(&mut self, attr: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(MatchingRoom::VT_ATTR, attr); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MatchingRoomBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + MatchingRoomBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for MatchingRoom<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MatchingRoom"); + ds.field("id", &self.id()); + ds.field("attr", &self.attr()); + ds.finish() + } +} +pub enum MatchingRoomListOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct MatchingRoomList<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for MatchingRoomList<'a> { + type Inner = MatchingRoomList<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> MatchingRoomList<'a> { + pub const VT_START: flatbuffers::VOffsetT = 4; + pub const VT_TOTAL: flatbuffers::VOffsetT = 6; + pub const VT_ROOMS: flatbuffers::VOffsetT = 8; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MatchingRoomList { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args MatchingRoomListArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = MatchingRoomListBuilder::new(_fbb); + if let Some(x) = args.rooms { builder.add_rooms(x); } + builder.add_total(args.total); + builder.add_start(args.start); + builder.finish() + } + + + #[inline] + pub fn start(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(MatchingRoomList::VT_START, Some(0)).unwrap()} + } + #[inline] + pub fn total(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(MatchingRoomList::VT_TOTAL, Some(0)).unwrap()} + } + #[inline] + pub fn rooms(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(MatchingRoomList::VT_ROOMS, None)} + } +} + +impl flatbuffers::Verifiable for MatchingRoomList<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("start", Self::VT_START, false)? + .visit_field::("total", Self::VT_TOTAL, false)? + .visit_field::>>>("rooms", Self::VT_ROOMS, false)? + .finish(); + Ok(()) + } +} +pub struct MatchingRoomListArgs<'a> { + pub start: u32, + pub total: u32, + pub rooms: Option>>>>, +} +impl<'a> Default for MatchingRoomListArgs<'a> { + #[inline] + fn default() -> Self { + MatchingRoomListArgs { + start: 0, + total: 0, + rooms: None, + } + } +} + +pub struct MatchingRoomListBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MatchingRoomListBuilder<'a, 'b, A> { + #[inline] + pub fn add_start(&mut self, start: u32) { + self.fbb_.push_slot::(MatchingRoomList::VT_START, start, 0); + } + #[inline] + pub fn add_total(&mut self, total: u32) { + self.fbb_.push_slot::(MatchingRoomList::VT_TOTAL, total, 0); + } + #[inline] + pub fn add_rooms(&mut self, rooms: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(MatchingRoomList::VT_ROOMS, rooms); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MatchingRoomListBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + MatchingRoomListBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for MatchingRoomList<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MatchingRoomList"); + ds.field("start", &self.start()); + ds.field("total", &self.total()); + ds.field("rooms", &self.rooms()); + ds.finish() + } +} +pub enum MatchingGuiRoomIdOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct MatchingGuiRoomId<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for MatchingGuiRoomId<'a> { + type Inner = MatchingGuiRoomId<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> MatchingGuiRoomId<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MatchingGuiRoomId { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args MatchingGuiRoomIdArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = MatchingGuiRoomIdBuilder::new(_fbb); + if let Some(x) = args.id { builder.add_id(x); } + builder.finish() + } + + + #[inline] + pub fn id(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(MatchingGuiRoomId::VT_ID, None)} + } +} + +impl flatbuffers::Verifiable for MatchingGuiRoomId<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>("id", Self::VT_ID, false)? + .finish(); + Ok(()) + } +} +pub struct MatchingGuiRoomIdArgs<'a> { + pub id: Option>>, +} +impl<'a> Default for MatchingGuiRoomIdArgs<'a> { + #[inline] + fn default() -> Self { + MatchingGuiRoomIdArgs { + id: None, + } + } +} + +pub struct MatchingGuiRoomIdBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MatchingGuiRoomIdBuilder<'a, 'b, A> { + #[inline] + pub fn add_id(&mut self, id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(MatchingGuiRoomId::VT_ID, id); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MatchingGuiRoomIdBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + MatchingGuiRoomIdBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for MatchingGuiRoomId<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MatchingGuiRoomId"); + ds.field("id", &self.id()); + ds.finish() + } +} +pub enum SetRoomSearchFlagGUIOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SetRoomSearchFlagGUI<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SetRoomSearchFlagGUI<'a> { + type Inner = SetRoomSearchFlagGUI<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SetRoomSearchFlagGUI<'a> { + pub const VT_ROOMID: flatbuffers::VOffsetT = 4; + pub const VT_STEALTH: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SetRoomSearchFlagGUI { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args SetRoomSearchFlagGUIArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = SetRoomSearchFlagGUIBuilder::new(_fbb); + if let Some(x) = args.roomid { builder.add_roomid(x); } + builder.add_stealth(args.stealth); + builder.finish() + } + + + #[inline] + pub fn roomid(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>(SetRoomSearchFlagGUI::VT_ROOMID, None)} + } + #[inline] + pub fn stealth(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SetRoomSearchFlagGUI::VT_STEALTH, Some(false)).unwrap()} + } +} + +impl flatbuffers::Verifiable for SetRoomSearchFlagGUI<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>("roomid", Self::VT_ROOMID, false)? + .visit_field::("stealth", Self::VT_STEALTH, false)? + .finish(); + Ok(()) + } +} +pub struct SetRoomSearchFlagGUIArgs<'a> { + pub roomid: Option>>, + pub stealth: bool, +} +impl<'a> Default for SetRoomSearchFlagGUIArgs<'a> { + #[inline] + fn default() -> Self { + SetRoomSearchFlagGUIArgs { + roomid: None, + stealth: false, + } + } +} + +pub struct SetRoomSearchFlagGUIBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SetRoomSearchFlagGUIBuilder<'a, 'b, A> { + #[inline] + pub fn add_roomid(&mut self, roomid: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SetRoomSearchFlagGUI::VT_ROOMID, roomid); + } + #[inline] + pub fn add_stealth(&mut self, stealth: bool) { + self.fbb_.push_slot::(SetRoomSearchFlagGUI::VT_STEALTH, stealth, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SetRoomSearchFlagGUIBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + SetRoomSearchFlagGUIBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for SetRoomSearchFlagGUI<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SetRoomSearchFlagGUI"); + ds.field("roomid", &self.roomid()); + ds.field("stealth", &self.stealth()); + ds.finish() + } +} +pub enum QuickMatchGUIRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct QuickMatchGUIRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for QuickMatchGUIRequest<'a> { + type Inner = QuickMatchGUIRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> QuickMatchGUIRequest<'a> { + pub const VT_CONDS: flatbuffers::VOffsetT = 4; + pub const VT_AVAILABLE_NUM: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + QuickMatchGUIRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args QuickMatchGUIRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = QuickMatchGUIRequestBuilder::new(_fbb); + builder.add_available_num(args.available_num); + if let Some(x) = args.conds { builder.add_conds(x); } + builder.finish() + } + + + #[inline] + pub fn conds(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(QuickMatchGUIRequest::VT_CONDS, None)} + } + #[inline] + pub fn available_num(&self) -> u32 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(QuickMatchGUIRequest::VT_AVAILABLE_NUM, Some(0)).unwrap()} + } +} + +impl flatbuffers::Verifiable for QuickMatchGUIRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>>("conds", Self::VT_CONDS, false)? + .visit_field::("available_num", Self::VT_AVAILABLE_NUM, false)? + .finish(); + Ok(()) + } +} +pub struct QuickMatchGUIRequestArgs<'a> { + pub conds: Option>>>>, + pub available_num: u32, +} +impl<'a> Default for QuickMatchGUIRequestArgs<'a> { + #[inline] + fn default() -> Self { + QuickMatchGUIRequestArgs { + conds: None, + available_num: 0, + } + } +} + +pub struct QuickMatchGUIRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> QuickMatchGUIRequestBuilder<'a, 'b, A> { + #[inline] + pub fn add_conds(&mut self, conds: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(QuickMatchGUIRequest::VT_CONDS, conds); + } + #[inline] + pub fn add_available_num(&mut self, available_num: u32) { + self.fbb_.push_slot::(QuickMatchGUIRequest::VT_AVAILABLE_NUM, available_num, 0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> QuickMatchGUIRequestBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + QuickMatchGUIRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for QuickMatchGUIRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("QuickMatchGUIRequest"); + ds.field("conds", &self.conds()); + ds.field("available_num", &self.available_num()); + ds.finish() + } +} +pub enum SearchJoinRoomGUIRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SearchJoinRoomGUIRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SearchJoinRoomGUIRequest<'a> { + type Inner = SearchJoinRoomGUIRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SearchJoinRoomGUIRequest<'a> { + pub const VT_CONDS: flatbuffers::VOffsetT = 4; + pub const VT_ATTRS: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SearchJoinRoomGUIRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args SearchJoinRoomGUIRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = SearchJoinRoomGUIRequestBuilder::new(_fbb); + if let Some(x) = args.attrs { builder.add_attrs(x); } + if let Some(x) = args.conds { builder.add_conds(x); } + builder.finish() + } + + + #[inline] + pub fn conds(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(SearchJoinRoomGUIRequest::VT_CONDS, None)} + } + #[inline] + pub fn attrs(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(SearchJoinRoomGUIRequest::VT_ATTRS, None)} + } +} + +impl flatbuffers::Verifiable for SearchJoinRoomGUIRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>>("conds", Self::VT_CONDS, false)? + .visit_field::>>>("attrs", Self::VT_ATTRS, false)? + .finish(); + Ok(()) + } +} +pub struct SearchJoinRoomGUIRequestArgs<'a> { + pub conds: Option>>>>, + pub attrs: Option>>>>, +} +impl<'a> Default for SearchJoinRoomGUIRequestArgs<'a> { + #[inline] + fn default() -> Self { + SearchJoinRoomGUIRequestArgs { + conds: None, + attrs: None, + } + } +} + +pub struct SearchJoinRoomGUIRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SearchJoinRoomGUIRequestBuilder<'a, 'b, A> { + #[inline] + pub fn add_conds(&mut self, conds: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(SearchJoinRoomGUIRequest::VT_CONDS, conds); + } + #[inline] + pub fn add_attrs(&mut self, attrs: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(SearchJoinRoomGUIRequest::VT_ATTRS, attrs); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SearchJoinRoomGUIRequestBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + SearchJoinRoomGUIRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for SearchJoinRoomGUIRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SearchJoinRoomGUIRequest"); + ds.field("conds", &self.conds()); + ds.field("attrs", &self.attrs()); + ds.finish() + } +} +pub enum MatchingSearchJoinRoomInfoOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct MatchingSearchJoinRoomInfo<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for MatchingSearchJoinRoomInfo<'a> { + type Inner = MatchingSearchJoinRoomInfo<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> MatchingSearchJoinRoomInfo<'a> { + pub const VT_ROOM: flatbuffers::VOffsetT = 4; + pub const VT_ATTR: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MatchingSearchJoinRoomInfo { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, + args: &'args MatchingSearchJoinRoomInfoArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = MatchingSearchJoinRoomInfoBuilder::new(_fbb); + if let Some(x) = args.attr { builder.add_attr(x); } + if let Some(x) = args.room { builder.add_room(x); } + builder.finish() + } + + + #[inline] + pub fn room(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(MatchingSearchJoinRoomInfo::VT_ROOM, None)} + } + #[inline] + pub fn attr(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(MatchingSearchJoinRoomInfo::VT_ATTR, None)} + } +} + +impl flatbuffers::Verifiable for MatchingSearchJoinRoomInfo<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("room", Self::VT_ROOM, false)? + .visit_field::>>>("attr", Self::VT_ATTR, false)? + .finish(); + Ok(()) + } +} +pub struct MatchingSearchJoinRoomInfoArgs<'a> { + pub room: Option>>, + pub attr: Option>>>>, +} +impl<'a> Default for MatchingSearchJoinRoomInfoArgs<'a> { + #[inline] + fn default() -> Self { + MatchingSearchJoinRoomInfoArgs { + room: None, + attr: None, + } + } +} + +pub struct MatchingSearchJoinRoomInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MatchingSearchJoinRoomInfoBuilder<'a, 'b, A> { + #[inline] + pub fn add_room(&mut self, room: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(MatchingSearchJoinRoomInfo::VT_ROOM, room); + } + #[inline] + pub fn add_attr(&mut self, attr: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(MatchingSearchJoinRoomInfo::VT_ATTR, attr); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MatchingSearchJoinRoomInfoBuilder<'a, 'b, A> { + let start = _fbb.start_table(); + MatchingSearchJoinRoomInfoBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for MatchingSearchJoinRoomInfo<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("MatchingSearchJoinRoomInfo"); + ds.field("room", &self.room()); + ds.field("attr", &self.attr()); + ds.finish() + } +}