diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index d95506e..2468aa1 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -28,7 +28,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2024-02-01 + toolchain: nightly override: true components: rust-src diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e7cc43..122f52b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2024-02-01 + toolchain: nightly override: true components: rust-src, rustfmt @@ -42,7 +42,7 @@ jobs: mkdir proto ( cd proto - wget "https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protoc-26.0-linux-x86_64.zip" -O protoc.zip + wget "https://github.com/protocolbuffers/protobuf/releases/download/v27.2/protoc-27.2-linux-x86_64.zip" -O protoc.zip unzip protoc.zip chmod +x bin/protoc mv bin/protoc /usr/local/bin/ @@ -52,7 +52,7 @@ jobs: mkdir flatbuffers ( cd flatbuffers - wget "https://github.com/google/flatbuffers/releases/download/v23.5.26/Linux.flatc.binary.clang++-12.zip" -O flatbuffers.zip + wget "https://github.com/google/flatbuffers/releases/download/v24.3.25/Linux.flatc.binary.clang++-15.zip" -O flatbuffers.zip unzip flatbuffers.zip chmod +x ./flatc mv ./flatc /usr/local/bin diff --git a/Cargo.toml b/Cargo.toml index 49b3dbc..b283e36 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,50 +50,49 @@ alkahest = { version = "=0.1.5", optional = true, features = [ "nightly", ] } bebop = { version = "=2.8.7", optional = true } -bilrost = { version = "=0.1007.0", optional = true } +bilrost = { version = "=0.1010.0", optional = true } bincode1 = { package = "bincode", version = "=1.3.3", optional = true } # Can't call it bincode2 because of a current issue of bincode2 bincode = { package = "bincode", version = "=2.0.0-rc.3", optional = true } bitcode = { version = "=0.6.0", optional = true } -borsh = { version = "=1.3.1", features = ["derive"], optional = true } +borsh = { version = "=1.5.1", features = ["derive"], optional = true } # TODO: Unfork after bson adds support for pre-warmed serialization buffers # https://github.com/mongodb/bson-rust/pull/328 bson = { version = "=2.9.0", git = "https://github.com/djkoloski/bson-rust", branch = "add_into_vec", optional = true } bytecheck = { version = "=0.6.12", optional = true } -bytemuck = { version = "=1.14.1", optional = true } -capnp = { version = "=0.18.13", optional = true } +bytemuck = { version = "=1.16.1", optional = true } +capnp = { version = "=0.19.6", optional = true } cbor4ii = { version = "=0.3.2", features = [ "use_std", "serde1" ], optional = true } ciborium = { version = "=0.2.2", optional = true } criterion = "=0.5.1" -databuf = { version = "=0.5", optional = true } -dlhn = { version = "=0.1.6", optional = true } -flatbuffers = { version = "=23.5.26", optional = true } -libflate = "=1.4.0" +databuf = { version = "=0.5.0", optional = true } +dlhn = { version = "=0.1.7", optional = true } +flatbuffers = { version = "=24.3.25", optional = true } +libflate = "=2.1.0" msgpacker = { version = "=0.4.3", optional = true } nachricht-serde = { version = "=0.4.0", optional = true } nanoserde = {version = "=0.1.37", optional = true } -parity-scale-codec = { version = "=3.6.9", features = ["full"], optional = true } -parity-scale-codec-derive = { version = "=3.6.9", optional = true } +parity-scale-codec = { version = "=3.6.12", features = ["full"], optional = true } +parity-scale-codec-derive = { version = "=3.6.12", optional = true } postcard = { version = "=1.0.8", features = ["alloc"], optional = true } pot = { version = "=3.0.0", optional = true } pprof = { version = "=0.13.0", features = ["flamegraph"], optional = true } -prost = { version = "=0.12.4", optional = true } +prost = { version = "=0.12.6", optional = true } rand = "=0.8.5" -# TODO: unfork after rkyv updates to 0.8 or `stdsimd` cfg for nightly in aHash 0.7 is fixed -rkyv = { version = "=0.7.44", git = "https://github.com/rkyv/rkyv", branch = "0.7-hashbrown-0.14", features = ["validation"], optional = true } -rmp-serde = { version = "=1.1.2", optional = true } +rkyv = { version = "=0.7.44", features = ["validation"], optional = true } +rmp-serde = { version = "=1.3.0", optional = true } ron = { version = "=0.8.1", optional = true } -serde = { version = "=1.0.196", features = ["derive"], optional = true } +serde = { version = "=1.0.204", features = ["derive"], optional = true } serde_bare = { version = "=0.5.0", optional = true } serde_cbor = { version = "=0.11.2", optional = true } -serde_json = { version = "=1.0.115", features = ["float_roundtrip"], optional = true } -simd-json = { version = "=0.13.9", optional = true } +serde_json = { version = "=1.0.120", features = ["float_roundtrip"], optional = true } +simd-json = { version = "=0.13.10", optional = true } simd-json-derive = { version = "=0.13.0", optional = true } speedy = { version = "=0.8.7", optional = true } -savefile = { version = "=0.16.5", optional = true } -savefile-derive = { version = "=0.16.5", optional = true } +savefile = { version = "=0.17.6", optional = true } +savefile-derive = { version = "=0.17.6", optional = true } wiring = { version = "=0.2.1", optional = true } -zstd = "=0.12.4" +zstd = "=0.13.2" [features] default = [ @@ -132,7 +131,7 @@ default = [ "simd-json", "speedy", "savefile", - "wiring" + # "wiring" # does not build: slice_flatten is being stabilized and has been renamed ] capnp = ["dep:capnp"] prost = ["dep:capnp", "dep:prost"] @@ -150,10 +149,10 @@ rand_pcg = "0.3.1" [build-dependencies] bebop-tools = "=2.8.7" -capnp = "=0.18.13" -capnpc = { version = "=0.18.1", optional = true } +capnp = "=0.19.6" +capnpc = { version = "=0.19.0", optional = true } flatc-rust = { version = "=0.2.0", optional = true } -prost-build = { version = "=0.12.4", optional = true } +prost-build = { version = "=0.12.6", optional = true } [[bench]] harness = false diff --git a/src/datasets/log/log_capnp.rs b/src/datasets/log/log_capnp.rs index 2af81a5..284b282 100644 --- a/src/datasets/log/log_capnp.rs +++ b/src/datasets/log/log_capnp.rs @@ -116,7 +116,7 @@ pub mod address { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -274,9 +274,11 @@ pub mod address { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,2,3]; pub const TYPE_ID: u64 = 0x96d2_eb22_6a8b_d47a; } } @@ -426,7 +428,7 @@ pub mod log { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -450,7 +452,7 @@ pub mod log { } #[inline] pub fn set_address(&mut self, value: crate::datasets::log::log_capnp::address::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) } #[inline] pub fn init_address(self, ) -> crate::datasets::log::log_capnp::address::Builder<'a> { @@ -465,8 +467,8 @@ pub mod log { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None) } #[inline] - pub fn set_identity(&mut self, value: ::capnp::text::Reader<'_>) { - self.builder.reborrow().get_pointer_field(1).set_text(value); + pub fn set_identity(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false).unwrap() } #[inline] pub fn init_identity(self, size: u32) -> ::capnp::text::Builder<'a> { @@ -481,8 +483,8 @@ pub mod log { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(2), ::core::option::Option::None) } #[inline] - pub fn set_userid(&mut self, value: ::capnp::text::Reader<'_>) { - self.builder.reborrow().get_pointer_field(2).set_text(value); + pub fn set_userid(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(2), value, false).unwrap() } #[inline] pub fn init_userid(self, size: u32) -> ::capnp::text::Builder<'a> { @@ -497,8 +499,8 @@ pub mod log { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(3), ::core::option::Option::None) } #[inline] - pub fn set_date(&mut self, value: ::capnp::text::Reader<'_>) { - self.builder.reborrow().get_pointer_field(3).set_text(value); + pub fn set_date(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(3), value, false).unwrap() } #[inline] pub fn init_date(self, size: u32) -> ::capnp::text::Builder<'a> { @@ -513,8 +515,8 @@ pub mod log { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(4), ::core::option::Option::None) } #[inline] - pub fn set_request(&mut self, value: ::capnp::text::Reader<'_>) { - self.builder.reborrow().get_pointer_field(4).set_text(value); + pub fn set_request(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(4), value, false).unwrap() } #[inline] pub fn init_request(self, size: u32) -> ::capnp::text::Builder<'a> { @@ -699,9 +701,11 @@ pub mod log { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3,4,5,6]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,5,3,1,4,6,2]; pub const TYPE_ID: u64 = 0x87f6_c7ab_2de3_81ff; } } @@ -811,7 +815,7 @@ pub mod logs { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -835,7 +839,7 @@ pub mod logs { } #[inline] pub fn set_logs(&mut self, value: ::capnp::struct_list::Reader<'_,crate::datasets::log::log_capnp::log::Owned>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) } #[inline] pub fn init_logs(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::datasets::log::log_capnp::log::Owned> { @@ -908,9 +912,11 @@ pub mod logs { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0]; pub const TYPE_ID: u64 = 0x9658_6a57_8e4a_5409; } } diff --git a/src/datasets/log/log_generated.rs b/src/datasets/log/log_generated.rs index a8e95e5..22d9820 100644 --- a/src/datasets/log/log_generated.rs +++ b/src/datasets/log/log_generated.rs @@ -235,8 +235,8 @@ impl<'a> Log<'a> { Log { _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 LogArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = LogBuilder::new(_fbb); @@ -344,11 +344,11 @@ impl<'a> Default for LogArgs<'a> { } } -pub struct LogBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct LogBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> LogBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LogBuilder<'a, 'b, A> { #[inline] pub fn add_address(&mut self, address: &Address) { self.fbb_.push_slot_always::<&Address>(Log::VT_ADDRESS, address); @@ -378,7 +378,7 @@ impl<'a: 'b, 'b> LogBuilder<'a, 'b> { self.fbb_.push_slot::(Log::VT_SIZE_, size_, 0); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> LogBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> LogBuilder<'a, 'b, A> { let start = _fbb.start_table(); LogBuilder { fbb_: _fbb, @@ -432,8 +432,8 @@ impl<'a> Logs<'a> { Logs { _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 LogsArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = LogsBuilder::new(_fbb); @@ -475,17 +475,17 @@ impl<'a> Default for LogsArgs<'a> { } } -pub struct LogsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct LogsBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> LogsBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LogsBuilder<'a, 'b, A> { #[inline] pub fn add_logs(&mut self, logs: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(Logs::VT_LOGS, logs); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> LogsBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> LogsBuilder<'a, 'b, A> { let start = _fbb.start_table(); LogsBuilder { fbb_: _fbb, diff --git a/src/datasets/mesh/mesh_capnp.rs b/src/datasets/mesh/mesh_capnp.rs index c3ca683..d8c38a5 100644 --- a/src/datasets/mesh/mesh_capnp.rs +++ b/src/datasets/mesh/mesh_capnp.rs @@ -112,7 +112,7 @@ pub mod vector3 { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -246,9 +246,11 @@ pub mod vector3 { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,2]; pub const TYPE_ID: u64 = 0xa52c_2b87_1d04_ba8f; } } @@ -382,7 +384,7 @@ pub mod triangle { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -406,7 +408,7 @@ pub mod triangle { } #[inline] pub fn set_v0(&mut self, value: crate::datasets::mesh::mesh_capnp::vector3::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) } #[inline] pub fn init_v0(self, ) -> crate::datasets::mesh::mesh_capnp::vector3::Builder<'a> { @@ -422,7 +424,7 @@ pub mod triangle { } #[inline] pub fn set_v1(&mut self, value: crate::datasets::mesh::mesh_capnp::vector3::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false) } #[inline] pub fn init_v1(self, ) -> crate::datasets::mesh::mesh_capnp::vector3::Builder<'a> { @@ -438,7 +440,7 @@ pub mod triangle { } #[inline] pub fn set_v2(&mut self, value: crate::datasets::mesh::mesh_capnp::vector3::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(2), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(2), value, false) } #[inline] pub fn init_v2(self, ) -> crate::datasets::mesh::mesh_capnp::vector3::Builder<'a> { @@ -454,7 +456,7 @@ pub mod triangle { } #[inline] pub fn set_normal(&mut self, value: crate::datasets::mesh::mesh_capnp::vector3::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(3), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(3), value, false) } #[inline] pub fn init_normal(self, ) -> crate::datasets::mesh::mesh_capnp::vector3::Builder<'a> { @@ -584,9 +586,11 @@ pub mod triangle { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[3,0,1,2]; pub const TYPE_ID: u64 = 0xac3d_8c78_c4b9_b72b; } } @@ -696,7 +700,7 @@ pub mod mesh { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -720,7 +724,7 @@ pub mod mesh { } #[inline] pub fn set_triangles(&mut self, value: ::capnp::struct_list::Reader<'_,crate::datasets::mesh::mesh_capnp::triangle::Owned>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) } #[inline] pub fn init_triangles(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::datasets::mesh::mesh_capnp::triangle::Owned> { @@ -795,9 +799,11 @@ pub mod mesh { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0]; pub const TYPE_ID: u64 = 0xd4a1_c84c_80d5_eea5; } } diff --git a/src/datasets/mesh/mesh_generated.rs b/src/datasets/mesh/mesh_generated.rs index 24e0015..9f31a84 100644 --- a/src/datasets/mesh/mesh_generated.rs +++ b/src/datasets/mesh/mesh_generated.rs @@ -317,8 +317,8 @@ impl<'a> Mesh<'a> { Mesh { _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 MeshArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = MeshBuilder::new(_fbb); @@ -360,17 +360,17 @@ impl<'a> Default for MeshArgs<'a> { } } -pub struct MeshBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct MeshBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> MeshBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MeshBuilder<'a, 'b, A> { #[inline] pub fn add_triangles(&mut self, triangles: flatbuffers::WIPOffset>) { self.fbb_.push_slot_always::>(Mesh::VT_TRIANGLES, triangles); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MeshBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MeshBuilder<'a, 'b, A> { let start = _fbb.start_table(); MeshBuilder { fbb_: _fbb, diff --git a/src/datasets/minecraft_savedata/minecraft_savedata_capnp.rs b/src/datasets/minecraft_savedata/minecraft_savedata_capnp.rs index 757b2d8..97e4b4a 100644 --- a/src/datasets/minecraft_savedata/minecraft_savedata_capnp.rs +++ b/src/datasets/minecraft_savedata/minecraft_savedata_capnp.rs @@ -201,7 +201,7 @@ pub mod item { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -240,8 +240,8 @@ pub mod item { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None) } #[inline] - pub fn set_id(&mut self, value: ::capnp::text::Reader<'_>) { - self.builder.reborrow().get_pointer_field(0).set_text(value); + pub fn set_id(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false).unwrap() } #[inline] pub fn init_id(self, size: u32) -> ::capnp::text::Builder<'a> { @@ -346,9 +346,11 @@ pub mod item { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,2,1]; pub const TYPE_ID: u64 = 0xe80c_a65e_fefd_a456; } } @@ -478,7 +480,7 @@ pub mod abilities { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -717,9 +719,11 @@ pub mod abilities { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3,4,5,6]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[1,3,6,4,5,2,0]; pub const TYPE_ID: u64 = 0xeb01_bb9a_c273_82d1; } } @@ -893,7 +897,7 @@ pub mod entity { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -916,8 +920,8 @@ pub mod entity { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None) } #[inline] - pub fn set_id(&mut self, value: ::capnp::text::Reader<'_>) { - self.builder.reborrow().get_pointer_field(0).set_text(value); + pub fn set_id(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false).unwrap() } #[inline] pub fn init_id(self, size: u32) -> ::capnp::text::Builder<'a> { @@ -1032,8 +1036,8 @@ pub mod entity { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None) } #[inline] - pub fn set_custom_name(&mut self, value: ::capnp::text::Reader<'_>) { - self.builder.reborrow().get_pointer_field(1).set_text(value); + pub fn set_custom_name(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false).unwrap() } #[inline] pub fn init_custom_name(self, size: u32) -> ::capnp::text::Builder<'a> { @@ -1363,9 +1367,11 @@ pub mod entity { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[6,12,13,4,5,15,0,9,2,8,7,10,1,3,14,11]; pub const TYPE_ID: u64 = 0xa4c4_298d_a569_4821; } @@ -1478,7 +1484,7 @@ pub mod entity { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -1615,9 +1621,11 @@ pub mod entity { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,2]; pub const TYPE_ID: u64 = 0xdef3_1493_9643_0df6; } } @@ -1731,7 +1739,7 @@ pub mod entity { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -1868,9 +1876,11 @@ pub mod entity { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,2]; pub const TYPE_ID: u64 = 0xf03a_4aba_cc0e_9775; } } @@ -1980,7 +1990,7 @@ pub mod entity { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -2094,9 +2104,11 @@ pub mod entity { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0xa1f6_5b5d_e1f5_56a5; } } @@ -2214,7 +2226,7 @@ pub mod entity { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -2375,9 +2387,11 @@ pub mod entity { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,2,3]; pub const TYPE_ID: u64 = 0x8202_c2ce_fb09_919d; } } @@ -2528,7 +2542,7 @@ pub mod recipe_book { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -2551,8 +2565,8 @@ pub mod recipe_book { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None) } #[inline] - pub fn set_recipes(&mut self, value: ::capnp::text_list::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) + pub fn set_recipes(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text_list::Owned>) -> ::capnp::Result<()> { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) } #[inline] pub fn init_recipes(self, size: u32) -> ::capnp::text_list::Builder<'a> { @@ -2567,8 +2581,8 @@ pub mod recipe_book { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None) } #[inline] - pub fn set_to_be_displayed(&mut self, value: ::capnp::text_list::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false) + pub fn set_to_be_displayed(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text_list::Owned>) -> ::capnp::Result<()> { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false) } #[inline] pub fn init_to_be_displayed(self, size: u32) -> ::capnp::text_list::Builder<'a> { @@ -2878,9 +2892,11 @@ pub mod recipe_book { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3,4,5,6,7,8,9]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[6,7,2,4,5,3,8,9,0,1]; pub const TYPE_ID: u64 = 0xc784_ef71_75eb_6eb4; } } @@ -3110,7 +3126,7 @@ pub mod player { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -3157,8 +3173,8 @@ pub mod player { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None) } #[inline] - pub fn set_dimension(&mut self, value: ::capnp::text::Reader<'_>) { - self.builder.reborrow().get_pointer_field(0).set_text(value); + pub fn set_dimension(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false).unwrap() } #[inline] pub fn init_dimension(self, size: u32) -> ::capnp::text::Builder<'a> { @@ -3182,7 +3198,7 @@ pub mod player { } #[inline] pub fn set_selected_item(&mut self, value: crate::datasets::minecraft_savedata::minecraft_savedata_capnp::item::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false) } #[inline] pub fn init_selected_item(self, ) -> crate::datasets::minecraft_savedata::minecraft_savedata_capnp::item::Builder<'a> { @@ -3293,7 +3309,7 @@ pub mod player { } #[inline] pub fn set_inventory(&mut self, value: ::capnp::struct_list::Reader<'_,crate::datasets::minecraft_savedata::minecraft_savedata_capnp::item::Owned>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(3), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(3), value, false) } #[inline] pub fn init_inventory(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::datasets::minecraft_savedata::minecraft_savedata_capnp::item::Owned> { @@ -3309,7 +3325,7 @@ pub mod player { } #[inline] pub fn set_ender_items(&mut self, value: ::capnp::struct_list::Reader<'_,crate::datasets::minecraft_savedata::minecraft_savedata_capnp::item::Owned>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(4), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(4), value, false) } #[inline] pub fn init_ender_items(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::datasets::minecraft_savedata::minecraft_savedata_capnp::item::Owned> { @@ -3325,7 +3341,7 @@ pub mod player { } #[inline] pub fn set_abilities(&mut self, value: crate::datasets::minecraft_savedata::minecraft_savedata_capnp::abilities::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(5), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(5), value, false) } #[inline] pub fn init_abilities(self, ) -> crate::datasets::minecraft_savedata::minecraft_savedata_capnp::abilities::Builder<'a> { @@ -3395,7 +3411,7 @@ pub mod player { } #[inline] pub fn set_recipe_book(&mut self, value: crate::datasets::minecraft_savedata::minecraft_savedata_capnp::recipe_book::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(9), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(9), value, false) } #[inline] pub fn init_recipe_book(self, ) -> crate::datasets::minecraft_savedata::minecraft_savedata_capnp::recipe_book::Builder<'a> { @@ -3884,9 +3900,11 @@ pub mod player { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[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]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[19,3,18,20,10,11,12,0,17,1,25,21,2,24,5,4,22,23,9,7,6,8,13,14,16,15]; pub const TYPE_ID: u64 = 0xae91_5b4d_6e13_f034; } @@ -4010,7 +4028,7 @@ pub mod player { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -4033,9 +4051,9 @@ pub mod player { self.builder.set_data_field::(8, 0); } #[inline] - pub fn set_some(&mut self, value: ::capnp::text::Reader<'_>) { + pub fn set_some(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::text::Owned>) { self.builder.set_data_field::(8, 1); - self.builder.reborrow().get_pointer_field(2).set_text(value); + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(2), value, false).unwrap() } #[inline] pub fn init_some(self, size: u32) -> ::capnp::text::Builder<'a> { @@ -4143,9 +4161,11 @@ pub mod player { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[0,1]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0xab4e_4173_a401_c9aa; } pub enum Which { @@ -4265,7 +4285,7 @@ pub mod player { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -4402,9 +4422,11 @@ pub mod player { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,2]; pub const TYPE_ID: u64 = 0xb9d8_f3d9_6715_bb8e; } } @@ -4524,7 +4546,7 @@ pub mod player { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -4647,9 +4669,11 @@ pub mod player { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[0,1]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0xca08_8848_7d66_f2df; } pub enum Which { @@ -4775,7 +4799,7 @@ pub mod player { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -4895,9 +4919,11 @@ pub mod player { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[0,1]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0x96c0_bbb4_3e82_1237; } pub enum Which { @@ -5016,7 +5042,7 @@ pub mod player { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -5156,9 +5182,11 @@ pub mod player { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,2]; pub const TYPE_ID: u64 = 0xc6af_15d4_c5e6_38b7; } } @@ -5279,7 +5307,7 @@ pub mod player { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -5400,9 +5428,11 @@ pub mod player { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[0,1]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0xe1ce_566d_6b19_8fb5; } pub enum Which { @@ -5521,7 +5551,7 @@ pub mod player { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -5557,7 +5587,7 @@ pub mod player { } #[inline] pub fn set_entity(&mut self, value: crate::datasets::minecraft_savedata::minecraft_savedata_capnp::entity::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(6), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(6), value, false) } #[inline] pub fn init_entity(self, ) -> crate::datasets::minecraft_savedata::minecraft_savedata_capnp::entity::Builder<'a> { @@ -5647,9 +5677,11 @@ pub mod player { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[1,0]; pub const TYPE_ID: u64 = 0xbb13_5874_77e1_a14b; } @@ -5766,7 +5798,7 @@ pub mod player { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -5929,9 +5961,11 @@ pub mod player { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,2,3]; pub const TYPE_ID: u64 = 0x83b8_f3d5_b8e1_61dd; } } @@ -6058,7 +6092,7 @@ pub mod player { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -6083,7 +6117,7 @@ pub mod player { #[inline] pub fn set_some(&mut self, value: crate::datasets::minecraft_savedata::minecraft_savedata_capnp::entity::Reader<'_>) -> ::capnp::Result<()> { self.builder.set_data_field::(60, 1); - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(7), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(7), value, false) } #[inline] pub fn init_some(self, ) -> crate::datasets::minecraft_savedata::minecraft_savedata_capnp::entity::Builder<'a> { @@ -6192,9 +6226,11 @@ pub mod player { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[0,1]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0xf770_22cb_2838_521d; } pub enum Which { @@ -6325,7 +6361,7 @@ pub mod player { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -6350,7 +6386,7 @@ pub mod player { #[inline] pub fn set_some(&mut self, value: crate::datasets::minecraft_savedata::minecraft_savedata_capnp::entity::Reader<'_>) -> ::capnp::Result<()> { self.builder.set_data_field::(61, 1); - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(8), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(8), value, false) } #[inline] pub fn init_some(self, ) -> crate::datasets::minecraft_savedata::minecraft_savedata_capnp::entity::Builder<'a> { @@ -6459,9 +6495,11 @@ pub mod player { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[0,1]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0x8bc9_8a23_c654_611c; } pub enum Which { @@ -6578,7 +6616,7 @@ pub mod players { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -6602,7 +6640,7 @@ pub mod players { } #[inline] pub fn set_players(&mut self, value: ::capnp::struct_list::Reader<'_,crate::datasets::minecraft_savedata::minecraft_savedata_capnp::player::Owned>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) } #[inline] pub fn init_players(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::datasets::minecraft_savedata::minecraft_savedata_capnp::player::Owned> { @@ -6680,9 +6718,11 @@ pub mod players { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0]; pub const TYPE_ID: u64 = 0x9a2e_339d_0113_73c2; } } diff --git a/src/datasets/minecraft_savedata/minecraft_savedata_generated.rs b/src/datasets/minecraft_savedata/minecraft_savedata_generated.rs index 2da2b76..2662109 100644 --- a/src/datasets/minecraft_savedata/minecraft_savedata_generated.rs +++ b/src/datasets/minecraft_savedata/minecraft_savedata_generated.rs @@ -888,8 +888,8 @@ impl<'a> Item<'a> { Item { _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 ItemArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = ItemBuilder::new(_fbb); @@ -953,11 +953,11 @@ impl<'a> Default for ItemArgs<'a> { } } -pub struct ItemBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct ItemBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> ItemBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ItemBuilder<'a, 'b, A> { #[inline] pub fn add_count(&mut self, count: i8) { self.fbb_.push_slot::(Item::VT_COUNT, count, 0); @@ -971,7 +971,7 @@ impl<'a: 'b, 'b> ItemBuilder<'a, 'b> { self.fbb_.push_slot_always::>(Item::VT_ID, id); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ItemBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ItemBuilder<'a, 'b, A> { let start = _fbb.start_table(); ItemBuilder { fbb_: _fbb, @@ -1033,8 +1033,8 @@ impl<'a> Entity<'a> { Entity { _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 EntityArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = EntityBuilder::new(_fbb); @@ -1241,11 +1241,11 @@ impl<'a> Default for EntityArgs<'a> { } } -pub struct EntityBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct EntityBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> EntityBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EntityBuilder<'a, 'b, A> { #[inline] pub fn add_id(&mut self, id: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(Entity::VT_ID, id); @@ -1311,7 +1311,7 @@ impl<'a: 'b, 'b> EntityBuilder<'a, 'b> { self.fbb_.push_slot::(Entity::VT_GLOWING, glowing, false); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> EntityBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EntityBuilder<'a, 'b, A> { let start = _fbb.start_table(); EntityBuilder { fbb_: _fbb, @@ -1384,8 +1384,8 @@ impl<'a> RecipeBook<'a> { RecipeBook { _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 RecipeBookArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = RecipeBookBuilder::new(_fbb); @@ -1526,11 +1526,11 @@ impl<'a> Default for RecipeBookArgs<'a> { } } -pub struct RecipeBookBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct RecipeBookBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> RecipeBookBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RecipeBookBuilder<'a, 'b, A> { #[inline] pub fn add_recipes(&mut self, recipes: flatbuffers::WIPOffset>>) { self.fbb_.push_slot_always::>(RecipeBook::VT_RECIPES, recipes); @@ -1572,7 +1572,7 @@ impl<'a: 'b, 'b> RecipeBookBuilder<'a, 'b> { self.fbb_.push_slot::(RecipeBook::VT_IS_SMOKER_GUI_OPEN, is_smoker_gui_open, false); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RecipeBookBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RecipeBookBuilder<'a, 'b, A> { let start = _fbb.start_table(); RecipeBookBuilder { fbb_: _fbb, @@ -1631,8 +1631,8 @@ impl<'a> Vehicle<'a> { Vehicle { _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 VehicleArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = VehicleBuilder::new(_fbb); @@ -1718,11 +1718,11 @@ impl<'a> Default for VehicleArgs<'a> { } } -pub struct VehicleBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct VehicleBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> VehicleBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> VehicleBuilder<'a, 'b, A> { #[inline] pub fn add_param_0(&mut self, param_0: u32) { self.fbb_.push_slot::(Vehicle::VT_PARAM_0, param_0, 0); @@ -1744,7 +1744,7 @@ impl<'a: 'b, 'b> VehicleBuilder<'a, 'b> { self.fbb_.push_slot_always::>(Vehicle::VT_ENTITY, entity); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> VehicleBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> VehicleBuilder<'a, 'b, A> { let start = _fbb.start_table(); VehicleBuilder { fbb_: _fbb, @@ -1820,8 +1820,8 @@ impl<'a> Player<'a> { Player { _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 PlayerArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = PlayerBuilder::new(_fbb); @@ -2160,11 +2160,11 @@ impl<'a> Default for PlayerArgs<'a> { } } -pub struct PlayerBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct PlayerBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> PlayerBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PlayerBuilder<'a, 'b, A> { #[inline] pub fn add_game_type(&mut self, game_type: GameType) { self.fbb_.push_slot::(Player::VT_GAME_TYPE, game_type, GameType::Survival); @@ -2278,7 +2278,7 @@ impl<'a: 'b, 'b> PlayerBuilder<'a, 'b> { self.fbb_.push_slot_always::>(Player::VT_RECIPE_BOOK, recipe_book); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> PlayerBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlayerBuilder<'a, 'b, A> { let start = _fbb.start_table(); PlayerBuilder { fbb_: _fbb, @@ -2355,8 +2355,8 @@ impl<'a> Players<'a> { Players { _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 PlayersArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = PlayersBuilder::new(_fbb); @@ -2398,17 +2398,17 @@ impl<'a> Default for PlayersArgs<'a> { } } -pub struct PlayersBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct PlayersBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> PlayersBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PlayersBuilder<'a, 'b, A> { #[inline] pub fn add_players(&mut self, players: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(Players::VT_PLAYERS, players); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> PlayersBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlayersBuilder<'a, 'b, A> { let start = _fbb.start_table(); PlayersBuilder { fbb_: _fbb, diff --git a/src/datasets/mk48/mk48_capnp.rs b/src/datasets/mk48/mk48_capnp.rs index 941ebab..b7809c6 100644 --- a/src/datasets/mk48/mk48_capnp.rs +++ b/src/datasets/mk48/mk48_capnp.rs @@ -233,7 +233,7 @@ pub mod transform { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -392,9 +392,11 @@ pub mod transform { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,2,3]; pub const TYPE_ID: u64 = 0xf3a9_5b0d_39e0_d8cf; } @@ -503,7 +505,7 @@ pub mod transform { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -613,9 +615,11 @@ pub mod transform { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0xb3c9_5ba2_b9a3_c5a8; } } @@ -730,7 +734,7 @@ pub mod guidance { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -866,9 +870,11 @@ pub mod guidance { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,2]; pub const TYPE_ID: u64 = 0xd7ae_1d3b_a67e_97c7; } } @@ -1018,7 +1024,7 @@ pub mod contact { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -1068,7 +1074,7 @@ pub mod contact { } #[inline] pub fn set_guidance(&mut self, value: crate::datasets::mk48::mk48_capnp::guidance::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) } #[inline] pub fn init_guidance(self, ) -> crate::datasets::mk48::mk48_capnp::guidance::Builder<'a> { @@ -1093,8 +1099,8 @@ pub mod contact { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(1), ::core::option::Option::None) } #[inline] - pub fn set_reloads(&mut self, value: ::capnp::primitive_list::Reader<'_,bool>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false) + pub fn set_reloads(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::primitive_list::Owned>) -> ::capnp::Result<()> { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false) } #[inline] pub fn init_reloads(self, size: u32) -> ::capnp::primitive_list::Builder<'a,bool> { @@ -1110,7 +1116,7 @@ pub mod contact { } #[inline] pub fn set_transform(&mut self, value: crate::datasets::mk48::mk48_capnp::transform::Reader<'_>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(2), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(2), value, false) } #[inline] pub fn init_transform(self, ) -> crate::datasets::mk48::mk48_capnp::transform::Builder<'a> { @@ -1125,8 +1131,8 @@ pub mod contact { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(3), ::core::option::Option::None) } #[inline] - pub fn set_turret_angles(&mut self, value: ::capnp::primitive_list::Reader<'_,u16>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(3), value, false) + pub fn set_turret_angles(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::primitive_list::Owned>) -> ::capnp::Result<()> { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(3), value, false) } #[inline] pub fn init_turret_angles(self, size: u32) -> ::capnp::primitive_list::Builder<'a,u16> { @@ -1320,9 +1326,11 @@ pub mod contact { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3,4,5,6,7]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,2,3,4,5,6,7]; pub const TYPE_ID: u64 = 0x826a_86d1_5bac_3821; } @@ -1441,7 +1449,7 @@ pub mod contact { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -1560,9 +1568,11 @@ pub mod contact { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[0,1]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0xacb0_b840_1e98_1430; } pub enum Which { @@ -1688,7 +1698,7 @@ pub mod contact { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -1807,9 +1817,11 @@ pub mod contact { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[0,1]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0xf63a_4a8e_d2d2_6914; } pub enum Which { @@ -1930,7 +1942,7 @@ pub mod terrain_update { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -1963,8 +1975,8 @@ pub mod terrain_update { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(0), ::core::option::Option::None) } #[inline] - pub fn set_data(&mut self, value: ::capnp::primitive_list::Reader<'_,u8>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) + pub fn set_data(&mut self, value: impl ::capnp::traits::SetterInput<::capnp::primitive_list::Owned>) -> ::capnp::Result<()> { + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) } #[inline] pub fn init_data(self, size: u32) -> ::capnp::primitive_list::Builder<'a,u8> { @@ -2051,9 +2063,11 @@ pub mod terrain_update { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0xc58e_d9f7_e9d1_663c; } @@ -2162,7 +2176,7 @@ pub mod terrain_update { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -2273,9 +2287,11 @@ pub mod terrain_update { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1]; pub const TYPE_ID: u64 = 0xa85b_f3b5_3fbc_321c; } } @@ -2402,7 +2418,7 @@ pub mod update { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -2426,7 +2442,7 @@ pub mod update { } #[inline] pub fn set_contacts(&mut self, value: ::capnp::struct_list::Reader<'_,crate::datasets::mk48::mk48_capnp::contact::Owned>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) } #[inline] pub fn init_contacts(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::datasets::mk48::mk48_capnp::contact::Owned> { @@ -2458,7 +2474,7 @@ pub mod update { } #[inline] pub fn set_terrain_updates(&mut self, value: ::capnp::struct_list::Reader<'_,crate::datasets::mk48::mk48_capnp::terrain_update::Owned>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(1), value, false) } #[inline] pub fn init_terrain_updates(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::datasets::mk48::mk48_capnp::terrain_update::Owned> { @@ -2587,9 +2603,11 @@ pub mod update { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0,1,2,3]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0,1,3,2]; pub const TYPE_ID: u64 = 0xfbfa_451d_8326_0a33; } } @@ -2699,7 +2717,7 @@ pub mod updates { } } - impl <'a,> ::capnp::traits::SetPointerBuilder for Reader<'a,> { + impl <'a,> ::capnp::traits::SetterInput> for Reader<'a,> { fn set_pointer_builder(mut pointer: ::capnp::private::layout::PointerBuilder<'_>, value: Self, canonicalize: bool) -> ::capnp::Result<()> { pointer.set_struct(&value.reader, canonicalize) } } @@ -2723,7 +2741,7 @@ pub mod updates { } #[inline] pub fn set_updates(&mut self, value: ::capnp::struct_list::Reader<'_,crate::datasets::mk48::mk48_capnp::update::Owned>) -> ::capnp::Result<()> { - ::capnp::traits::SetPointerBuilder::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) + ::capnp::traits::SetterInput::set_pointer_builder(self.builder.reborrow().get_pointer_field(0), value, false) } #[inline] pub fn init_updates(self, size: u32) -> ::capnp::struct_list::Builder<'a,crate::datasets::mk48::mk48_capnp::update::Owned> { @@ -2797,9 +2815,11 @@ pub mod updates { encoded_node: &ENCODED_NODE, nonunion_members: NONUNION_MEMBERS, members_by_discriminant: MEMBERS_BY_DISCRIMINANT, + members_by_name: MEMBERS_BY_NAME, }; pub static NONUNION_MEMBERS : &[u16] = &[0]; pub static MEMBERS_BY_DISCRIMINANT : &[u16] = &[]; + pub static MEMBERS_BY_NAME : &[u16] = &[0]; pub const TYPE_ID: u64 = 0xfa45_0c67_fb5e_63d3; } } diff --git a/src/datasets/mk48/mk48_generated.rs b/src/datasets/mk48/mk48_generated.rs index fb0c0a0..4dfb2eb 100644 --- a/src/datasets/mk48/mk48_generated.rs +++ b/src/datasets/mk48/mk48_generated.rs @@ -740,8 +740,8 @@ impl<'a> Contact<'a> { Contact { _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 ContactArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = ContactBuilder::new(_fbb); @@ -860,11 +860,11 @@ impl<'a> Default for ContactArgs<'a> { } } -pub struct ContactBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct ContactBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> ContactBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContactBuilder<'a, 'b, A> { #[inline] pub fn add_damage(&mut self, damage: u8) { self.fbb_.push_slot::(Contact::VT_DAMAGE, damage, 0); @@ -898,7 +898,7 @@ impl<'a: 'b, 'b> ContactBuilder<'a, 'b> { self.fbb_.push_slot_always::>(Contact::VT_TURRET_ANGLES, turret_angles); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ContactBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ContactBuilder<'a, 'b, A> { let start = _fbb.start_table(); ContactBuilder { fbb_: _fbb, @@ -952,8 +952,8 @@ impl<'a> TerrainUpdate<'a> { TerrainUpdate { _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 TerrainUpdateArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = TerrainUpdateBuilder::new(_fbb); @@ -1006,11 +1006,11 @@ impl<'a> Default for TerrainUpdateArgs<'a> { } } -pub struct TerrainUpdateBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct TerrainUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TerrainUpdateBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TerrainUpdateBuilder<'a, 'b, A> { #[inline] pub fn add_chunk_id(&mut self, chunk_id: &ChunkId) { self.fbb_.push_slot_always::<&ChunkId>(TerrainUpdate::VT_CHUNK_ID, chunk_id); @@ -1020,7 +1020,7 @@ impl<'a: 'b, 'b> TerrainUpdateBuilder<'a, 'b> { self.fbb_.push_slot_always::>(TerrainUpdate::VT_DATA, data); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TerrainUpdateBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TerrainUpdateBuilder<'a, 'b, A> { let start = _fbb.start_table(); TerrainUpdateBuilder { fbb_: _fbb, @@ -1068,8 +1068,8 @@ impl<'a> Update<'a> { Update { _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 UpdateArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = UpdateBuilder::new(_fbb); @@ -1144,11 +1144,11 @@ impl<'a> Default for UpdateArgs<'a> { } } -pub struct UpdateBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct UpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> UpdateBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UpdateBuilder<'a, 'b, A> { #[inline] pub fn add_contacts(&mut self, contacts: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(Update::VT_CONTACTS, contacts); @@ -1166,7 +1166,7 @@ impl<'a: 'b, 'b> UpdateBuilder<'a, 'b> { self.fbb_.push_slot_always::>(Update::VT_TERRAIN_UPDATES, terrain_updates); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> UpdateBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UpdateBuilder<'a, 'b, A> { let start = _fbb.start_table(); UpdateBuilder { fbb_: _fbb, @@ -1215,8 +1215,8 @@ impl<'a> Updates<'a> { Updates { _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 UpdatesArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = UpdatesBuilder::new(_fbb); @@ -1258,17 +1258,17 @@ impl<'a> Default for UpdatesArgs<'a> { } } -pub struct UpdatesBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, +pub struct UpdatesBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> UpdatesBuilder<'a, 'b> { +impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UpdatesBuilder<'a, 'b, A> { #[inline] pub fn add_updates(&mut self, updates: flatbuffers::WIPOffset>>>) { self.fbb_.push_slot_always::>(Updates::VT_UPDATES, updates); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> UpdatesBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UpdatesBuilder<'a, 'b, A> { let start = _fbb.start_table(); UpdatesBuilder { fbb_: _fbb,