From 0cbeca85c73623340c9ab4b697c96c6b8a8a5c67 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Tue, 1 Sep 2026 09:10:19 -0500 Subject: [PATCH 1/9] build: pin flatc, stop regenerating bindings on every build, check drift in CI The flatbuffers bindings are checked in, but `build.rs` shelled out to whatever `flatc` was on PATH and rewrote them in place on every build -- and did nothing at all when there was no flatc to find. Both halves caused real problems. Different flatc releases format their output differently, so anyone whose compiler did not match the one the bindings came from got thousands of lines of unrelated churn mixed into their diff, on every build, whether or not they had touched a schema. Not hypothetical: commit 8070e93, "revert: undo accidental flatbuffers regen from #72", exists because it reached main. The silent fallback is the worse half. CI does not install flatc, so CI never regenerated anything -- it compiled the checked-in bindings and reported success. A schema edit that was never regenerated therefore passed CI while the bindings on disk still described the previous schema, and nothing anywhere compared the two. So regeneration is now explicit (FREENET_REGEN_FLATBUFFERS=1) and refuses to run under a flatc other than the pinned one, and a new CI job regenerates with that compiler and fails if the result differs from what is committed. That job, not the build, is what enforces the relationship between schemas and bindings. Pinned to 24.3.25 on evidence rather than preference: it matches the `flatbuffers` crate version already in Cargo.toml, regenerating the TypeScript bindings with it is a no-op against what is committed, and the Rust bindings it produces pass the byte-frozen wire-format tests unchanged -- so the wire format is untouched and only the generated code style moves. The version check in the CI job is deliberate: a silently-different compiler would make the whole job compare the wrong thing and pass, which is the failure mode it exists to prevent. Verified: regeneration is idempotent (identical diff on a second run), a plain build leaves a reverted binding file reverted, 56 Rust tests pass including all three wire-format pins, clippy is clean, and 78 TypeScript tests pass. Refs #106 [AI-assisted - Claude] --- .github/workflows/ci.yml | 69 ++++++++++++++++++++++++ rust/build.rs | 114 ++++++++++++++++++++++++++++++++++----- 2 files changed, 170 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2204cd2..785db41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,6 +139,75 @@ jobs: - name: Test run: npm test + flatbuffers_drift: + name: Flatbuffers bindings match schemas + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: rustfmt + + - uses: actions/setup-node@v4 + with: + node-version: '20' + + # Pinned deliberately. Different flatc releases format their output + # differently, so this job compares against one specific compiler; bump it + # and PINNED_FLATC in rust/build.rs together, in a commit that also + # regenerates. + - name: Install pinned flatc + env: + FLATC_VERSION: 24.3.25 + run: | + curl -sSfL -o flatc.zip \ + "https://github.com/google/flatbuffers/releases/download/v${FLATC_VERSION}/Linux.flatc.binary.g++-13.zip" + unzip -q flatc.zip -d "$HOME/.flatc" + chmod +x "$HOME/.flatc/flatc" + echo "$HOME/.flatc" >> "$GITHUB_PATH" + + - name: Verify flatc version + run: | + # A silently-different compiler would make this whole job compare the + # wrong thing and pass, which is the failure mode it exists to prevent. + installed="$(flatc --version | awk '{print $NF}')" + if [ "$installed" != "24.3.25" ]; then + echo "expected flatc 24.3.25, got '$installed'" >&2 + exit 1 + fi + + - name: Regenerate Rust bindings + working-directory: rust + run: | + FREENET_REGEN_FLATBUFFERS=1 cargo build + cargo fmt + + - name: Regenerate TypeScript bindings + working-directory: typescript + run: | + npm install + npm run flatc-schemas + + # Until this job existed nothing compared the schemas to the bindings: the + # build regenerated only when a contributor happened to have flatc, and CI + # never installed it, so a schema edit that was never regenerated compiled + # and passed against bindings describing the previous schema. + - name: Fail if the committed bindings are stale + run: | + if ! git diff --exit-code; then + echo >&2 + echo "The committed flatbuffers bindings do not match the schemas." >&2 + echo "Regenerate them and commit the result:" >&2 + echo " (cd rust && FREENET_REGEN_FLATBUFFERS=1 cargo build && cargo fmt)" >&2 + echo " (cd typescript && npm run flatc-schemas)" >&2 + echo "This needs flatc 24.3.25 specifically; another release reformats every file." >&2 + exit 1 + fi + claude-ci-analysis: name: Claude CI Analysis diff --git a/rust/build.rs b/rust/build.rs index df45757..6e29e2a 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -1,18 +1,106 @@ +//! Build script for `freenet-stdlib`. +//! +//! The flatbuffers bindings in `src/generated/` are **checked in**, and an +//! ordinary build does not rebuild them. Regeneration happens only when +//! `FREENET_REGEN_FLATBUFFERS=1` is set, and only with the pinned `flatc`. +//! +//! It used to work the other way: every build shelled out to whatever `flatc` +//! happened to be on `PATH` and rewrote the bindings in place, silently doing +//! nothing at all when there was no `flatc` to find. Both halves of that caused +//! real problems. +//! +//! Different `flatc` releases format their output differently, so a contributor +//! whose compiler did not match the one the bindings were generated with got +//! thousands of lines of unrelated churn mixed into their diff, on every build, +//! whether or not they had touched a schema. That is not hypothetical: commit +//! 8070e93, "revert: undo accidental flatbuffers regen from #72", exists because +//! it reached `main`. +//! +//! The silent fallback is the more dangerous half. CI does not install `flatc`, +//! so CI never regenerated anything — it compiled the checked-in bindings and +//! reported success. A schema edit that was never regenerated therefore passed +//! CI while the bindings on disk still described the *old* schema, and nothing +//! anywhere compared the two. +//! +//! So: regeneration is explicit, and `ci.yml`'s `flatbuffers-drift` job is what +//! actually enforces the relationship, by regenerating with the pinned compiler +//! and failing if the result differs from what is committed. + use std::process::Command; +/// The `flatc` release whose output matches the checked-in bindings. +/// +/// Verified against both languages at the time of pinning: regenerating the +/// TypeScript bindings with this version is a no-op, and the Rust bindings it +/// produces pass the byte-frozen wire-format tests in `client_api::client_events` +/// unchanged. It also matches the `flatbuffers` crate version in `Cargo.toml`; +/// keep the two in step when either moves. +const PINNED_FLATC: &str = "24.3.25"; + +const SCHEMAS: [&str; 3] = [ + "../schemas/flatbuffers/common.fbs", + "../schemas/flatbuffers/client_request.fbs", + "../schemas/flatbuffers/host_response.fbs", +]; + fn main() { - let status = Command::new("flatc") - .arg("--rust") - .arg("-o") - .arg("src/generated") - .arg("../schemas/flatbuffers/common.fbs") - .arg("../schemas/flatbuffers/client_request.fbs") - .arg("../schemas/flatbuffers/host_response.fbs") - .status(); - if let Err(err) = status { - println!("failed compiling flatbuffers schema: {err}"); - println!("refer to https://github.com/google/flatbuffers to install the flatc compiler"); - } else { - let _ = Command::new("cargo").arg("fmt").status(); + println!("cargo:rerun-if-env-changed=FREENET_REGEN_FLATBUFFERS"); + for schema in SCHEMAS { + println!("cargo:rerun-if-changed={schema}"); + } + + if std::env::var_os("FREENET_REGEN_FLATBUFFERS").is_none() { + return; + } + + // Note: `cargo:` directives are parsed from stdout only. A warning written + // to stderr renders nowhere, so every diagnostic here goes through + // `println!` — including the ones that read like errors. + match installed_flatc_version() { + Some(version) if version == PINNED_FLATC => {} + Some(version) => { + println!( + "cargo:warning=FREENET_REGEN_FLATBUFFERS is set but flatc {version} is \ + installed; the bindings are pinned to {PINNED_FLATC}. Regenerating with a \ + different compiler rewrites every generated file. Skipping regeneration." + ); + return; + } + None => { + println!( + "cargo:warning=FREENET_REGEN_FLATBUFFERS is set but no flatc was found on \ + PATH. Install flatc {PINNED_FLATC} (https://github.com/google/flatbuffers). \ + Skipping regeneration." + ); + return; + } + } + + let mut cmd = Command::new("flatc"); + cmd.arg("--rust").arg("-o").arg("src/generated"); + for schema in SCHEMAS { + cmd.arg(schema); + } + match cmd.status() { + Ok(status) if status.success() => { + // The checked-in bindings are formatted, so the regenerated ones + // must be too or the drift check compares formatting, not content. + let _ = Command::new("cargo").arg("fmt").status(); + } + Ok(status) => println!("cargo:warning=flatc exited with {status}"), + Err(err) => println!("cargo:warning=failed to run flatc: {err}"), + } +} + +/// The `x.y.z` of the `flatc` on `PATH`, or `None` when it cannot be run. +/// +/// `flatc --version` prints a line like `flatc version 24.3.25`; the version is +/// the last whitespace-separated token. +fn installed_flatc_version() -> Option { + let out = Command::new("flatc").arg("--version").output().ok()?; + if !out.status.success() { + return None; } + let stdout = String::from_utf8(out.stdout).ok()?; + Some(stdout.split_whitespace().last()?.to_string()) } From 45523cc07317f3fdb70cff0e5df8b0db3f49a752 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Tue, 1 Sep 2026 09:10:34 -0500 Subject: [PATCH 2/9] chore: regenerate flatbuffers bindings with the pinned flatc 24.3.25 Mechanical. No schema changed and no hand-written code changed; this is the output of the regeneration path added in the previous commit, so that the committed bindings match what the pinned compiler produces and the new drift check passes on a clean tree. The bindings had drifted from every flatc release available: they matched neither 2.0.8, 24.3.25, nor 25.9.23 output, even after formatting. That is the accumulated residue of being rewritten by whichever compiler each contributor happened to have. The wire format does not change. The three byte-frozen wire-format tests in client_api::client_events pass unchanged, which is the evidence that this is a formatting-and-imports change rather than a protocol one. Reviewers: this diff is generated output and does not need reading line by line. The previous commit is the one with the argument in it. Refs #106 [AI-assisted - Claude] --- .../src/generated/client_request_generated.rs | 1681 +++++++++-------- rust/src/generated/common_generated.rs | 995 +++++----- rust/src/generated/host_response_generated.rs | 1349 ++++++------- 3 files changed, 2052 insertions(+), 1973 deletions(-) diff --git a/rust/src/generated/client_request_generated.rs b/rust/src/generated/client_request_generated.rs index 045569e..e25782b 100644 --- a/rust/src/generated/client_request_generated.rs +++ b/rust/src/generated/client_request_generated.rs @@ -1,13 +1,23 @@ // automatically generated by the FlatBuffers compiler, do not modify + // @generated -extern crate alloc; use crate::common_generated::*; +use core::cmp::Ordering; +use core::mem; + +extern crate flatbuffers; +use self::flatbuffers::{EndianScalar, Follow}; #[allow(unused_imports, dead_code)] pub mod client_request { use crate::common_generated::*; + use core::cmp::Ordering; + use core::mem; + + extern crate flatbuffers; + use self::flatbuffers::{EndianScalar, Follow}; #[deprecated( since = "2.0.0", @@ -47,8 +57,8 @@ pub mod client_request { } } } - impl ::core::fmt::Debug for DelegateType { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { + impl core::fmt::Debug for DelegateType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { @@ -56,24 +66,24 @@ pub mod client_request { } } } - impl<'a> ::flatbuffers::Follow<'a> for DelegateType { + impl<'a> flatbuffers::Follow<'a> for DelegateType { type Inner = Self; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { ::flatbuffers::read_scalar_at::(buf, loc) }; + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } - impl ::flatbuffers::Push for DelegateType { + impl flatbuffers::Push for DelegateType { type Output = DelegateType; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - unsafe { ::flatbuffers::emplace_scalar::(dst, self.0) }; + flatbuffers::emplace_scalar::(dst, self.0); } } - impl ::flatbuffers::EndianScalar for DelegateType { + impl flatbuffers::EndianScalar for DelegateType { type Scalar = u8; #[inline] fn to_little_endian(self) -> u8 { @@ -87,17 +97,18 @@ pub mod client_request { } } - impl<'a> ::flatbuffers::Verifiable for DelegateType { + impl<'a> flatbuffers::Verifiable for DelegateType { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; u8::run_verifier(v, pos) } } - impl ::flatbuffers::SimpleToVerifyInSlice for DelegateType {} + impl flatbuffers::SimpleToVerifyInSlice for DelegateType {} pub struct DelegateTypeUnionTableOffset {} #[deprecated( @@ -155,8 +166,8 @@ pub mod client_request { } } } - impl ::core::fmt::Debug for ContractRequestType { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { + impl core::fmt::Debug for ContractRequestType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { @@ -164,24 +175,24 @@ pub mod client_request { } } } - impl<'a> ::flatbuffers::Follow<'a> for ContractRequestType { + impl<'a> flatbuffers::Follow<'a> for ContractRequestType { type Inner = Self; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { ::flatbuffers::read_scalar_at::(buf, loc) }; + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } - impl ::flatbuffers::Push for ContractRequestType { + impl flatbuffers::Push for ContractRequestType { type Output = ContractRequestType; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - unsafe { ::flatbuffers::emplace_scalar::(dst, self.0) }; + flatbuffers::emplace_scalar::(dst, self.0); } } - impl ::flatbuffers::EndianScalar for ContractRequestType { + impl flatbuffers::EndianScalar for ContractRequestType { type Scalar = u8; #[inline] fn to_little_endian(self) -> u8 { @@ -195,17 +206,18 @@ pub mod client_request { } } - impl<'a> ::flatbuffers::Verifiable for ContractRequestType { + impl<'a> flatbuffers::Verifiable for ContractRequestType { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; u8::run_verifier(v, pos) } } - impl ::flatbuffers::SimpleToVerifyInSlice for ContractRequestType {} + impl flatbuffers::SimpleToVerifyInSlice for ContractRequestType {} pub struct ContractRequestTypeUnionTableOffset {} #[deprecated( @@ -255,8 +267,8 @@ pub mod client_request { } } } - impl ::core::fmt::Debug for InboundDelegateMsgType { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { + impl core::fmt::Debug for InboundDelegateMsgType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { @@ -264,24 +276,24 @@ pub mod client_request { } } } - impl<'a> ::flatbuffers::Follow<'a> for InboundDelegateMsgType { + impl<'a> flatbuffers::Follow<'a> for InboundDelegateMsgType { type Inner = Self; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { ::flatbuffers::read_scalar_at::(buf, loc) }; + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } - impl ::flatbuffers::Push for InboundDelegateMsgType { + impl flatbuffers::Push for InboundDelegateMsgType { type Output = InboundDelegateMsgType; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - unsafe { ::flatbuffers::emplace_scalar::(dst, self.0) }; + flatbuffers::emplace_scalar::(dst, self.0); } } - impl ::flatbuffers::EndianScalar for InboundDelegateMsgType { + impl flatbuffers::EndianScalar for InboundDelegateMsgType { type Scalar = u8; #[inline] fn to_little_endian(self) -> u8 { @@ -295,17 +307,18 @@ pub mod client_request { } } - impl<'a> ::flatbuffers::Verifiable for InboundDelegateMsgType { + impl<'a> flatbuffers::Verifiable for InboundDelegateMsgType { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; u8::run_verifier(v, pos) } } - impl ::flatbuffers::SimpleToVerifyInSlice for InboundDelegateMsgType {} + impl flatbuffers::SimpleToVerifyInSlice for InboundDelegateMsgType {} pub struct InboundDelegateMsgTypeUnionTableOffset {} #[deprecated( @@ -359,8 +372,8 @@ pub mod client_request { } } } - impl ::core::fmt::Debug for DelegateRequestType { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { + impl core::fmt::Debug for DelegateRequestType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { @@ -368,24 +381,24 @@ pub mod client_request { } } } - impl<'a> ::flatbuffers::Follow<'a> for DelegateRequestType { + impl<'a> flatbuffers::Follow<'a> for DelegateRequestType { type Inner = Self; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { ::flatbuffers::read_scalar_at::(buf, loc) }; + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } - impl ::flatbuffers::Push for DelegateRequestType { + impl flatbuffers::Push for DelegateRequestType { type Output = DelegateRequestType; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - unsafe { ::flatbuffers::emplace_scalar::(dst, self.0) }; + flatbuffers::emplace_scalar::(dst, self.0); } } - impl ::flatbuffers::EndianScalar for DelegateRequestType { + impl flatbuffers::EndianScalar for DelegateRequestType { type Scalar = u8; #[inline] fn to_little_endian(self) -> u8 { @@ -399,17 +412,18 @@ pub mod client_request { } } - impl<'a> ::flatbuffers::Verifiable for DelegateRequestType { + impl<'a> flatbuffers::Verifiable for DelegateRequestType { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; u8::run_verifier(v, pos) } } - impl ::flatbuffers::SimpleToVerifyInSlice for DelegateRequestType {} + impl flatbuffers::SimpleToVerifyInSlice for DelegateRequestType {} pub struct DelegateRequestTypeUnionTableOffset {} #[deprecated( @@ -471,8 +485,8 @@ pub mod client_request { } } } - impl ::core::fmt::Debug for ClientRequestType { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { + impl core::fmt::Debug for ClientRequestType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { @@ -480,24 +494,24 @@ pub mod client_request { } } } - impl<'a> ::flatbuffers::Follow<'a> for ClientRequestType { + impl<'a> flatbuffers::Follow<'a> for ClientRequestType { type Inner = Self; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { ::flatbuffers::read_scalar_at::(buf, loc) }; + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } - impl ::flatbuffers::Push for ClientRequestType { + impl flatbuffers::Push for ClientRequestType { type Output = ClientRequestType; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - unsafe { ::flatbuffers::emplace_scalar::(dst, self.0) }; + flatbuffers::emplace_scalar::(dst, self.0); } } - impl ::flatbuffers::EndianScalar for ClientRequestType { + impl flatbuffers::EndianScalar for ClientRequestType { type Scalar = u8; #[inline] fn to_little_endian(self) -> u8 { @@ -511,42 +525,43 @@ pub mod client_request { } } - impl<'a> ::flatbuffers::Verifiable for ClientRequestType { + impl<'a> flatbuffers::Verifiable for ClientRequestType { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; u8::run_verifier(v, pos) } } - impl ::flatbuffers::SimpleToVerifyInSlice for ClientRequestType {} + impl flatbuffers::SimpleToVerifyInSlice for ClientRequestType {} pub struct ClientRequestTypeUnionTableOffset {} pub enum DelegateCodeOffset {} #[derive(Copy, Clone, PartialEq)] pub struct DelegateCode<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for DelegateCode<'a> { + impl<'a> flatbuffers::Follow<'a> for DelegateCode<'a> { type Inner = DelegateCode<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> DelegateCode<'a> { - pub const VT_DATA: ::flatbuffers::VOffsetT = 4; - pub const VT_CODE_HASH: ::flatbuffers::VOffsetT = 6; + pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_CODE_HASH: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { DelegateCode { _tab: table } } #[allow(unused_mut)] @@ -554,11 +569,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args DelegateCodeArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = DelegateCodeBuilder::new(_fbb); if let Some(x) = args.code_hash { builder.add_code_hash(x); @@ -570,13 +585,13 @@ pub mod client_request { } #[inline] - pub fn data(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn data(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( DelegateCode::VT_DATA, None, ) @@ -584,13 +599,13 @@ pub mod client_request { } } #[inline] - pub fn code_hash(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn code_hash(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( DelegateCode::VT_CODE_HASH, None, ) @@ -599,19 +614,20 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for DelegateCode<'_> { + impl flatbuffers::Verifiable for DelegateCode<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "data", Self::VT_DATA, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "code_hash", Self::VT_CODE_HASH, true, @@ -621,8 +637,8 @@ pub mod client_request { } } pub struct DelegateCodeArgs<'a> { - pub data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub code_hash: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub data: Option>>, + pub code_hash: Option>>, } impl<'a> Default for DelegateCodeArgs<'a> { #[inline] @@ -634,29 +650,29 @@ pub mod client_request { } } - pub struct DelegateCodeBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct DelegateCodeBuilder<'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> DelegateCodeBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DelegateCodeBuilder<'a, 'b, A> { #[inline] - pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(DelegateCode::VT_DATA, data); + .push_slot_always::>(DelegateCode::VT_DATA, data); } #[inline] pub fn add_code_hash( &mut self, - code_hash: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + code_hash: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( DelegateCode::VT_CODE_HASH, code_hash, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> DelegateCodeBuilder<'a, 'b, A> { let start = _fbb.start_table(); DelegateCodeBuilder { @@ -665,17 +681,17 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, DelegateCode::VT_DATA, "data"); self.fbb_ .required(o, DelegateCode::VT_CODE_HASH, "code_hash"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for DelegateCode<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for DelegateCode<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DelegateCode"); ds.field("data", &self.data()); ds.field("code_hash", &self.code_hash()); @@ -686,25 +702,25 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct DelegateKey<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for DelegateKey<'a> { + impl<'a> flatbuffers::Follow<'a> for DelegateKey<'a> { type Inner = DelegateKey<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> DelegateKey<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_CODE_HASH: ::flatbuffers::VOffsetT = 6; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_CODE_HASH: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { DelegateKey { _tab: table } } #[allow(unused_mut)] @@ -712,11 +728,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args DelegateKeyArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = DelegateKeyBuilder::new(_fbb); if let Some(x) = args.code_hash { builder.add_code_hash(x); @@ -728,13 +744,13 @@ pub mod client_request { } #[inline] - pub fn key(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn key(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( DelegateKey::VT_KEY, None, ) @@ -742,13 +758,13 @@ pub mod client_request { } } #[inline] - pub fn code_hash(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn code_hash(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( DelegateKey::VT_CODE_HASH, None, ) @@ -757,19 +773,20 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for DelegateKey<'_> { + impl flatbuffers::Verifiable for DelegateKey<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "key", Self::VT_KEY, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "code_hash", Self::VT_CODE_HASH, true, @@ -779,8 +796,8 @@ pub mod client_request { } } pub struct DelegateKeyArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub code_hash: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub key: Option>>, + pub code_hash: Option>>, } impl<'a> Default for DelegateKeyArgs<'a> { #[inline] @@ -792,29 +809,29 @@ pub mod client_request { } } - pub struct DelegateKeyBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct DelegateKeyBuilder<'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> DelegateKeyBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DelegateKeyBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(DelegateKey::VT_KEY, key); + .push_slot_always::>(DelegateKey::VT_KEY, key); } #[inline] pub fn add_code_hash( &mut self, - code_hash: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + code_hash: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( DelegateKey::VT_CODE_HASH, code_hash, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> DelegateKeyBuilder<'a, 'b, A> { let start = _fbb.start_table(); DelegateKeyBuilder { @@ -823,17 +840,17 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, DelegateKey::VT_KEY, "key"); self.fbb_ .required(o, DelegateKey::VT_CODE_HASH, "code_hash"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for DelegateKey<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for DelegateKey<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DelegateKey"); ds.field("key", &self.key()); ds.field("code_hash", &self.code_hash()); @@ -844,24 +861,24 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct DelegateContext<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for DelegateContext<'a> { + impl<'a> flatbuffers::Follow<'a> for DelegateContext<'a> { type Inner = DelegateContext<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> DelegateContext<'a> { - pub const VT_DATA: ::flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { DelegateContext { _tab: table } } #[allow(unused_mut)] @@ -869,11 +886,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args DelegateContextArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = DelegateContextBuilder::new(_fbb); if let Some(x) = args.data { builder.add_data(x); @@ -882,13 +899,13 @@ pub mod client_request { } #[inline] - pub fn data(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn data(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( DelegateContext::VT_DATA, None, ) @@ -897,14 +914,15 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for DelegateContext<'_> { + impl flatbuffers::Verifiable for DelegateContext<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "data", Self::VT_DATA, true, @@ -914,7 +932,7 @@ pub mod client_request { } } pub struct DelegateContextArgs<'a> { - pub data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub data: Option>>, } impl<'a> Default for DelegateContextArgs<'a> { #[inline] @@ -925,19 +943,19 @@ pub mod client_request { } } - pub struct DelegateContextBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct DelegateContextBuilder<'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> DelegateContextBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DelegateContextBuilder<'a, 'b, A> { #[inline] - pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(DelegateContext::VT_DATA, data); + .push_slot_always::>(DelegateContext::VT_DATA, data); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> DelegateContextBuilder<'a, 'b, A> { let start = _fbb.start_table(); DelegateContextBuilder { @@ -946,15 +964,15 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, DelegateContext::VT_DATA, "data"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for DelegateContext<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for DelegateContext<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DelegateContext"); ds.field("data", &self.data()); ds.finish() @@ -964,26 +982,26 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct WasmDelegateV1<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for WasmDelegateV1<'a> { + impl<'a> flatbuffers::Follow<'a> for WasmDelegateV1<'a> { type Inner = WasmDelegateV1<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> WasmDelegateV1<'a> { - pub const VT_PARAMETERS: ::flatbuffers::VOffsetT = 4; - pub const VT_DATA: ::flatbuffers::VOffsetT = 6; - pub const VT_KEY: ::flatbuffers::VOffsetT = 8; + pub const VT_PARAMETERS: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 6; + pub const VT_KEY: flatbuffers::VOffsetT = 8; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { WasmDelegateV1 { _tab: table } } #[allow(unused_mut)] @@ -991,11 +1009,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args WasmDelegateV1Args<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = WasmDelegateV1Builder::new(_fbb); if let Some(x) = args.key { builder.add_key(x); @@ -1010,13 +1028,13 @@ pub mod client_request { } #[inline] - pub fn parameters(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn parameters(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( WasmDelegateV1::VT_PARAMETERS, None, ) @@ -1030,7 +1048,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( WasmDelegateV1::VT_DATA, None, ) @@ -1044,33 +1062,31 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( - WasmDelegateV1::VT_KEY, - None, - ) + .get::>(WasmDelegateV1::VT_KEY, None) .unwrap() } } } - impl ::flatbuffers::Verifiable for WasmDelegateV1<'_> { + impl flatbuffers::Verifiable for WasmDelegateV1<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "parameters", Self::VT_PARAMETERS, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "data", Self::VT_DATA, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, @@ -1080,9 +1096,9 @@ pub mod client_request { } } pub struct WasmDelegateV1Args<'a> { - pub parameters: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub data: Option<::flatbuffers::WIPOffset>>, - pub key: Option<::flatbuffers::WIPOffset>>, + pub parameters: Option>>, + pub data: Option>>, + pub key: Option>>, } impl<'a> Default for WasmDelegateV1Args<'a> { #[inline] @@ -1095,40 +1111,40 @@ pub mod client_request { } } - pub struct WasmDelegateV1Builder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct WasmDelegateV1Builder<'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> WasmDelegateV1Builder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WasmDelegateV1Builder<'a, 'b, A> { #[inline] pub fn add_parameters( &mut self, - parameters: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + parameters: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( WasmDelegateV1::VT_PARAMETERS, parameters, ); } #[inline] - pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset>) { + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( WasmDelegateV1::VT_DATA, data, ); } #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( WasmDelegateV1::VT_KEY, key, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> WasmDelegateV1Builder<'a, 'b, A> { let start = _fbb.start_table(); WasmDelegateV1Builder { @@ -1137,18 +1153,18 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, WasmDelegateV1::VT_PARAMETERS, "parameters"); self.fbb_.required(o, WasmDelegateV1::VT_DATA, "data"); self.fbb_.required(o, WasmDelegateV1::VT_KEY, "key"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for WasmDelegateV1<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for WasmDelegateV1<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("WasmDelegateV1"); ds.field("parameters", &self.parameters()); ds.field("data", &self.data()); @@ -1160,25 +1176,25 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct DelegateContainer<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for DelegateContainer<'a> { + impl<'a> flatbuffers::Follow<'a> for DelegateContainer<'a> { type Inner = DelegateContainer<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> DelegateContainer<'a> { - pub const VT_DELEGATE_TYPE: ::flatbuffers::VOffsetT = 4; - pub const VT_DELEGATE: ::flatbuffers::VOffsetT = 6; + pub const VT_DELEGATE_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_DELEGATE: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { DelegateContainer { _tab: table } } #[allow(unused_mut)] @@ -1186,11 +1202,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args DelegateContainerArgs, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = DelegateContainerBuilder::new(_fbb); if let Some(x) = args.delegate { builder.add_delegate(x); @@ -1214,13 +1230,13 @@ pub mod client_request { } } #[inline] - pub fn delegate(&self) -> ::flatbuffers::Table<'a> { + pub fn delegate(&self) -> flatbuffers::Table<'a> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>( + .get::>>( DelegateContainer::VT_DELEGATE, None, ) @@ -1242,12 +1258,13 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for DelegateContainer<'_> { + impl flatbuffers::Verifiable for DelegateContainer<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_union::( "delegate_type", @@ -1257,7 +1274,7 @@ pub mod client_request { true, |key, v, pos| match key { DelegateType::WasmDelegateV1 => v - .verify_union_variant::<::flatbuffers::ForwardsUOffset>( + .verify_union_variant::>( "DelegateType::WasmDelegateV1", pos, ), @@ -1270,7 +1287,7 @@ pub mod client_request { } pub struct DelegateContainerArgs { pub delegate_type: DelegateType, - pub delegate: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>, + pub delegate: Option>, } impl<'a> Default for DelegateContainerArgs { #[inline] @@ -1282,11 +1299,11 @@ pub mod client_request { } } - pub struct DelegateContainerBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct DelegateContainerBuilder<'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> DelegateContainerBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DelegateContainerBuilder<'a, 'b, A> { #[inline] pub fn add_delegate_type(&mut self, delegate_type: DelegateType) { self.fbb_.push_slot::( @@ -1298,16 +1315,16 @@ pub mod client_request { #[inline] pub fn add_delegate( &mut self, - delegate: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>, + delegate: flatbuffers::WIPOffset, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( DelegateContainer::VT_DELEGATE, delegate, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> DelegateContainerBuilder<'a, 'b, A> { let start = _fbb.start_table(); DelegateContainerBuilder { @@ -1316,16 +1333,16 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, DelegateContainer::VT_DELEGATE, "delegate"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for DelegateContainer<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for DelegateContainer<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DelegateContainer"); ds.field("delegate_type", &self.delegate_type()); match self.delegate_type() { @@ -1351,25 +1368,25 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct RelatedContract<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for RelatedContract<'a> { + impl<'a> flatbuffers::Follow<'a> for RelatedContract<'a> { type Inner = RelatedContract<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> RelatedContract<'a> { - pub const VT_INSTANCE_ID: ::flatbuffers::VOffsetT = 4; - pub const VT_STATE: ::flatbuffers::VOffsetT = 6; + pub const VT_INSTANCE_ID: flatbuffers::VOffsetT = 4; + pub const VT_STATE: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { RelatedContract { _tab: table } } #[allow(unused_mut)] @@ -1377,11 +1394,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RelatedContractArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = RelatedContractBuilder::new(_fbb); if let Some(x) = args.state { builder.add_state(x); @@ -1399,7 +1416,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( RelatedContract::VT_INSTANCE_ID, None, ) @@ -1407,13 +1424,13 @@ pub mod client_request { } } #[inline] - pub fn state(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn state(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( RelatedContract::VT_STATE, None, ) @@ -1422,19 +1439,20 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for RelatedContract<'_> { + impl flatbuffers::Verifiable for RelatedContract<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "instance_id", Self::VT_INSTANCE_ID, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "state", Self::VT_STATE, true, @@ -1444,8 +1462,8 @@ pub mod client_request { } } pub struct RelatedContractArgs<'a> { - pub instance_id: Option<::flatbuffers::WIPOffset>>, - pub state: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub instance_id: Option>>, + pub state: Option>>, } impl<'a> Default for RelatedContractArgs<'a> { #[inline] @@ -1457,33 +1475,30 @@ pub mod client_request { } } - pub struct RelatedContractBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct RelatedContractBuilder<'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> RelatedContractBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RelatedContractBuilder<'a, 'b, A> { #[inline] pub fn add_instance_id( &mut self, - instance_id: ::flatbuffers::WIPOffset>, + instance_id: flatbuffers::WIPOffset>, ) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( RelatedContract::VT_INSTANCE_ID, instance_id, ); } #[inline] - pub fn add_state( - &mut self, - state: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { + pub fn add_state(&mut self, state: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(RelatedContract::VT_STATE, state); + .push_slot_always::>(RelatedContract::VT_STATE, state); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> RelatedContractBuilder<'a, 'b, A> { let start = _fbb.start_table(); RelatedContractBuilder { @@ -1492,17 +1507,17 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, RelatedContract::VT_INSTANCE_ID, "instance_id"); self.fbb_.required(o, RelatedContract::VT_STATE, "state"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for RelatedContract<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for RelatedContract<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("RelatedContract"); ds.field("instance_id", &self.instance_id()); ds.field("state", &self.state()); @@ -1513,24 +1528,24 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct RelatedContracts<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for RelatedContracts<'a> { + impl<'a> flatbuffers::Follow<'a> for RelatedContracts<'a> { type Inner = RelatedContracts<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> RelatedContracts<'a> { - pub const VT_CONTRACTS: ::flatbuffers::VOffsetT = 4; + pub const VT_CONTRACTS: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { RelatedContracts { _tab: table } } #[allow(unused_mut)] @@ -1538,11 +1553,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RelatedContractsArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = RelatedContractsBuilder::new(_fbb); if let Some(x) = args.contracts { builder.add_contracts(x); @@ -1553,30 +1568,30 @@ pub mod client_request { #[inline] pub fn contracts( &self, - ) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>> - { + ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset< - ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>, + .get::>, >>(RelatedContracts::VT_CONTRACTS, None) .unwrap() } } } - impl ::flatbuffers::Verifiable for RelatedContracts<'_> { + impl flatbuffers::Verifiable for RelatedContracts<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset< - ::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset>, + .visit_field::>, >>("contracts", Self::VT_CONTRACTS, true)? .finish(); Ok(()) @@ -1584,8 +1599,8 @@ pub mod client_request { } pub struct RelatedContractsArgs<'a> { pub contracts: Option< - ::flatbuffers::WIPOffset< - ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>>, + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, >, >, } @@ -1598,26 +1613,26 @@ pub mod client_request { } } - pub struct RelatedContractsBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct RelatedContractsBuilder<'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> RelatedContractsBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RelatedContractsBuilder<'a, 'b, A> { #[inline] pub fn add_contracts( &mut self, - contracts: ::flatbuffers::WIPOffset< - ::flatbuffers::Vector<'b, ::flatbuffers::ForwardsUOffset>>, + contracts: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, >, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( RelatedContracts::VT_CONTRACTS, contracts, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> RelatedContractsBuilder<'a, 'b, A> { let start = _fbb.start_table(); RelatedContractsBuilder { @@ -1626,16 +1641,16 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, RelatedContracts::VT_CONTRACTS, "contracts"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for RelatedContracts<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for RelatedContracts<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("RelatedContracts"); ds.field("contracts", &self.contracts()); ds.finish() @@ -1645,28 +1660,28 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct Put<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for Put<'a> { + impl<'a> flatbuffers::Follow<'a> for Put<'a> { type Inner = Put<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> Put<'a> { - pub const VT_CONTAINER: ::flatbuffers::VOffsetT = 4; - pub const VT_WRAPPED_STATE: ::flatbuffers::VOffsetT = 6; - pub const VT_RELATED_CONTRACTS: ::flatbuffers::VOffsetT = 8; - pub const VT_SUBSCRIBE: ::flatbuffers::VOffsetT = 10; - pub const VT_BLOCKING_SUBSCRIBE: ::flatbuffers::VOffsetT = 12; + pub const VT_CONTAINER: flatbuffers::VOffsetT = 4; + pub const VT_WRAPPED_STATE: flatbuffers::VOffsetT = 6; + pub const VT_RELATED_CONTRACTS: flatbuffers::VOffsetT = 8; + pub const VT_SUBSCRIBE: flatbuffers::VOffsetT = 10; + pub const VT_BLOCKING_SUBSCRIBE: flatbuffers::VOffsetT = 12; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Put { _tab: table } } #[allow(unused_mut)] @@ -1674,11 +1689,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args PutArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = PutBuilder::new(_fbb); if let Some(x) = args.related_contracts { builder.add_related_contracts(x); @@ -1701,7 +1716,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( Put::VT_CONTAINER, None, ) @@ -1709,13 +1724,13 @@ pub mod client_request { } } #[inline] - pub fn wrapped_state(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn wrapped_state(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( Put::VT_WRAPPED_STATE, None, ) @@ -1729,7 +1744,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( Put::VT_RELATED_CONTRACTS, None, ) @@ -1760,24 +1775,25 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for Put<'_> { + impl flatbuffers::Verifiable for Put<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "container", Self::VT_CONTAINER, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "wrapped_state", Self::VT_WRAPPED_STATE, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "related_contracts", Self::VT_RELATED_CONTRACTS, true, @@ -1789,9 +1805,9 @@ pub mod client_request { } } pub struct PutArgs<'a> { - pub container: Option<::flatbuffers::WIPOffset>>, - pub wrapped_state: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub related_contracts: Option<::flatbuffers::WIPOffset>>, + pub container: Option>>, + pub wrapped_state: Option>>, + pub related_contracts: Option>>, pub subscribe: bool, pub blocking_subscribe: bool, } @@ -1808,18 +1824,18 @@ pub mod client_request { } } - pub struct PutBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct PutBuilder<'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> PutBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PutBuilder<'a, 'b, A> { #[inline] pub fn add_container( &mut self, - container: ::flatbuffers::WIPOffset>, + container: flatbuffers::WIPOffset>, ) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( Put::VT_CONTAINER, container, ); @@ -1827,9 +1843,9 @@ pub mod client_request { #[inline] pub fn add_wrapped_state( &mut self, - wrapped_state: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + wrapped_state: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( Put::VT_WRAPPED_STATE, wrapped_state, ); @@ -1837,10 +1853,10 @@ pub mod client_request { #[inline] pub fn add_related_contracts( &mut self, - related_contracts: ::flatbuffers::WIPOffset>, + related_contracts: flatbuffers::WIPOffset>, ) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( Put::VT_RELATED_CONTRACTS, related_contracts, ); @@ -1856,7 +1872,7 @@ pub mod client_request { .push_slot::(Put::VT_BLOCKING_SUBSCRIBE, blocking_subscribe, false); } #[inline] - pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PutBuilder<'a, 'b, A> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PutBuilder<'a, 'b, A> { let start = _fbb.start_table(); PutBuilder { fbb_: _fbb, @@ -1864,19 +1880,19 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, Put::VT_CONTAINER, "container"); self.fbb_ .required(o, Put::VT_WRAPPED_STATE, "wrapped_state"); self.fbb_ .required(o, Put::VT_RELATED_CONTRACTS, "related_contracts"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for Put<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for Put<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Put"); ds.field("container", &self.container()); ds.field("wrapped_state", &self.wrapped_state()); @@ -1890,25 +1906,25 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct Update<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for Update<'a> { + impl<'a> flatbuffers::Follow<'a> for Update<'a> { type Inner = Update<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> Update<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_DATA: ::flatbuffers::VOffsetT = 6; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Update { _tab: table } } #[allow(unused_mut)] @@ -1916,11 +1932,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args UpdateArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = UpdateBuilder::new(_fbb); if let Some(x) = args.data { builder.add_data(x); @@ -1938,7 +1954,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( Update::VT_KEY, None, ) @@ -1952,7 +1968,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( Update::VT_DATA, None, ) @@ -1961,19 +1977,20 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for Update<'_> { + impl flatbuffers::Verifiable for Update<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "data", Self::VT_DATA, true, @@ -1983,8 +2000,8 @@ pub mod client_request { } } pub struct UpdateArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset>>, - pub data: Option<::flatbuffers::WIPOffset>>, + pub key: Option>>, + pub data: Option>>, } impl<'a> Default for UpdateArgs<'a> { #[inline] @@ -1996,30 +2013,30 @@ pub mod client_request { } } - pub struct UpdateBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct UpdateBuilder<'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> UpdateBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UpdateBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( Update::VT_KEY, key, ); } #[inline] - pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset>) { + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( Update::VT_DATA, data, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> UpdateBuilder<'a, 'b, A> { let start = _fbb.start_table(); UpdateBuilder { @@ -2028,16 +2045,16 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, Update::VT_KEY, "key"); self.fbb_.required(o, Update::VT_DATA, "data"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for Update<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for Update<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Update"); ds.field("key", &self.key()); ds.field("data", &self.data()); @@ -2048,27 +2065,27 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct Get<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for Get<'a> { + impl<'a> flatbuffers::Follow<'a> for Get<'a> { type Inner = Get<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> Get<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_FETCH_CONTRACT: ::flatbuffers::VOffsetT = 6; - pub const VT_SUBSCRIBE: ::flatbuffers::VOffsetT = 8; - pub const VT_BLOCKING_SUBSCRIBE: ::flatbuffers::VOffsetT = 10; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_FETCH_CONTRACT: flatbuffers::VOffsetT = 6; + pub const VT_SUBSCRIBE: flatbuffers::VOffsetT = 8; + pub const VT_BLOCKING_SUBSCRIBE: flatbuffers::VOffsetT = 10; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Get { _tab: table } } #[allow(unused_mut)] @@ -2076,11 +2093,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = GetBuilder::new(_fbb); if let Some(x) = args.key { builder.add_key(x); @@ -2098,7 +2115,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( Get::VT_KEY, None, ) @@ -2140,14 +2157,15 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for Get<'_> { + impl flatbuffers::Verifiable for Get<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, @@ -2160,7 +2178,7 @@ pub mod client_request { } } pub struct GetArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset>>, + pub key: Option>>, pub fetch_contract: bool, pub subscribe: bool, pub blocking_subscribe: bool, @@ -2177,15 +2195,15 @@ pub mod client_request { } } - pub struct GetBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct GetBuilder<'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> GetBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( Get::VT_KEY, key, ); @@ -2206,7 +2224,7 @@ pub mod client_request { .push_slot::(Get::VT_BLOCKING_SUBSCRIBE, blocking_subscribe, false); } #[inline] - pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> GetBuilder<'a, 'b, A> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetBuilder { fbb_: _fbb, @@ -2214,15 +2232,15 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, Get::VT_KEY, "key"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for Get<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for Get<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Get"); ds.field("key", &self.key()); ds.field("fetch_contract", &self.fetch_contract()); @@ -2235,25 +2253,25 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct Subscribe<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for Subscribe<'a> { + impl<'a> flatbuffers::Follow<'a> for Subscribe<'a> { type Inner = Subscribe<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> Subscribe<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_SUMMARY: ::flatbuffers::VOffsetT = 6; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_SUMMARY: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Subscribe { _tab: table } } #[allow(unused_mut)] @@ -2261,11 +2279,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SubscribeArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = SubscribeBuilder::new(_fbb); if let Some(x) = args.summary { builder.add_summary(x); @@ -2283,7 +2301,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( Subscribe::VT_KEY, None, ) @@ -2291,13 +2309,13 @@ pub mod client_request { } } #[inline] - pub fn summary(&self) -> Option<::flatbuffers::Vector<'a, u8>> { + pub fn summary(&self) -> Option> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( Subscribe::VT_SUMMARY, None, ) @@ -2305,19 +2323,20 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for Subscribe<'_> { + impl flatbuffers::Verifiable for Subscribe<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "summary", Self::VT_SUMMARY, false, @@ -2327,8 +2346,8 @@ pub mod client_request { } } pub struct SubscribeArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset>>, - pub summary: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub key: Option>>, + pub summary: Option>>, } impl<'a> Default for SubscribeArgs<'a> { #[inline] @@ -2340,15 +2359,15 @@ pub mod client_request { } } - pub struct SubscribeBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct SubscribeBuilder<'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> SubscribeBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SubscribeBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( Subscribe::VT_KEY, key, ); @@ -2356,14 +2375,14 @@ pub mod client_request { #[inline] pub fn add_summary( &mut self, - summary: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + summary: flatbuffers::WIPOffset>, ) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(Subscribe::VT_SUMMARY, summary); + .push_slot_always::>(Subscribe::VT_SUMMARY, summary); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> SubscribeBuilder<'a, 'b, A> { let start = _fbb.start_table(); SubscribeBuilder { @@ -2372,15 +2391,15 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, Subscribe::VT_KEY, "key"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for Subscribe<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for Subscribe<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Subscribe"); ds.field("key", &self.key()); ds.field("summary", &self.summary()); @@ -2391,24 +2410,24 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct ClientResponse<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ClientResponse<'a> { + impl<'a> flatbuffers::Follow<'a> for ClientResponse<'a> { type Inner = ClientResponse<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ClientResponse<'a> { - pub const VT_DATA: ::flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ClientResponse { _tab: table } } #[allow(unused_mut)] @@ -2416,11 +2435,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ClientResponseArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ClientResponseBuilder::new(_fbb); if let Some(x) = args.data { builder.add_data(x); @@ -2429,13 +2448,13 @@ pub mod client_request { } #[inline] - pub fn data(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn data(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( ClientResponse::VT_DATA, None, ) @@ -2444,14 +2463,15 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for ClientResponse<'_> { + impl flatbuffers::Verifiable for ClientResponse<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "data", Self::VT_DATA, true, @@ -2461,7 +2481,7 @@ pub mod client_request { } } pub struct ClientResponseArgs<'a> { - pub data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub data: Option>>, } impl<'a> Default for ClientResponseArgs<'a> { #[inline] @@ -2472,19 +2492,19 @@ pub mod client_request { } } - pub struct ClientResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ClientResponseBuilder<'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> ClientResponseBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ClientResponseBuilder<'a, 'b, A> { #[inline] - pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(ClientResponse::VT_DATA, data); + .push_slot_always::>(ClientResponse::VT_DATA, data); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ClientResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); ClientResponseBuilder { @@ -2493,15 +2513,15 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, ClientResponse::VT_DATA, "data"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ClientResponse<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ClientResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ClientResponse"); ds.field("data", &self.data()); ds.finish() @@ -2511,26 +2531,26 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct UserInputResponse<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for UserInputResponse<'a> { + impl<'a> flatbuffers::Follow<'a> for UserInputResponse<'a> { type Inner = UserInputResponse<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> UserInputResponse<'a> { - pub const VT_REQUEST_ID: ::flatbuffers::VOffsetT = 4; - pub const VT_RESPONSE: ::flatbuffers::VOffsetT = 6; - pub const VT_DELEGATE_CONTEXT: ::flatbuffers::VOffsetT = 8; + pub const VT_REQUEST_ID: flatbuffers::VOffsetT = 4; + pub const VT_RESPONSE: flatbuffers::VOffsetT = 6; + pub const VT_DELEGATE_CONTEXT: flatbuffers::VOffsetT = 8; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { UserInputResponse { _tab: table } } #[allow(unused_mut)] @@ -2538,11 +2558,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args UserInputResponseArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = UserInputResponseBuilder::new(_fbb); if let Some(x) = args.delegate_context { builder.add_delegate_context(x); @@ -2572,7 +2592,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( UserInputResponse::VT_RESPONSE, None, ) @@ -2580,13 +2600,13 @@ pub mod client_request { } } #[inline] - pub fn delegate_context(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn delegate_context(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( UserInputResponse::VT_DELEGATE_CONTEXT, None, ) @@ -2595,20 +2615,21 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for UserInputResponse<'_> { + impl flatbuffers::Verifiable for UserInputResponse<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_field::("request_id", Self::VT_REQUEST_ID, false)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "response", Self::VT_RESPONSE, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "delegate_context", Self::VT_DELEGATE_CONTEXT, true, @@ -2619,8 +2640,8 @@ pub mod client_request { } pub struct UserInputResponseArgs<'a> { pub request_id: u32, - pub response: Option<::flatbuffers::WIPOffset>>, - pub delegate_context: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub response: Option>>, + pub delegate_context: Option>>, } impl<'a> Default for UserInputResponseArgs<'a> { #[inline] @@ -2633,20 +2654,20 @@ pub mod client_request { } } - pub struct UserInputResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct UserInputResponseBuilder<'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> UserInputResponseBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UserInputResponseBuilder<'a, 'b, A> { #[inline] pub fn add_request_id(&mut self, request_id: u32) { self.fbb_ .push_slot::(UserInputResponse::VT_REQUEST_ID, request_id, 0); } #[inline] - pub fn add_response(&mut self, response: ::flatbuffers::WIPOffset>) { + pub fn add_response(&mut self, response: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( UserInputResponse::VT_RESPONSE, response, ); @@ -2654,16 +2675,16 @@ pub mod client_request { #[inline] pub fn add_delegate_context( &mut self, - delegate_context: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + delegate_context: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( UserInputResponse::VT_DELEGATE_CONTEXT, delegate_context, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> UserInputResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); UserInputResponseBuilder { @@ -2672,7 +2693,7 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, UserInputResponse::VT_RESPONSE, "response"); @@ -2681,12 +2702,12 @@ pub mod client_request { UserInputResponse::VT_DELEGATE_CONTEXT, "delegate_context", ); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for UserInputResponse<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for UserInputResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("UserInputResponse"); ds.field("request_id", &self.request_id()); ds.field("response", &self.response()); @@ -2698,25 +2719,25 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct InboundDelegateMsg<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for InboundDelegateMsg<'a> { + impl<'a> flatbuffers::Follow<'a> for InboundDelegateMsg<'a> { type Inner = InboundDelegateMsg<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> InboundDelegateMsg<'a> { - pub const VT_INBOUND_TYPE: ::flatbuffers::VOffsetT = 4; - pub const VT_INBOUND: ::flatbuffers::VOffsetT = 6; + pub const VT_INBOUND_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_INBOUND: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { InboundDelegateMsg { _tab: table } } #[allow(unused_mut)] @@ -2724,11 +2745,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args InboundDelegateMsgArgs, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = InboundDelegateMsgBuilder::new(_fbb); if let Some(x) = args.inbound { builder.add_inbound(x); @@ -2752,13 +2773,13 @@ pub mod client_request { } } #[inline] - pub fn inbound(&self) -> ::flatbuffers::Table<'a> { + pub fn inbound(&self) -> flatbuffers::Table<'a> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>( + .get::>>( InboundDelegateMsg::VT_INBOUND, None, ) @@ -2796,17 +2817,18 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for InboundDelegateMsg<'_> { + impl flatbuffers::Verifiable for InboundDelegateMsg<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_union::("inbound_type", Self::VT_INBOUND_TYPE, "inbound", Self::VT_INBOUND, true, |key, v, pos| { match key { - InboundDelegateMsgType::common_ApplicationMessage => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("InboundDelegateMsgType::common_ApplicationMessage", pos), - InboundDelegateMsgType::UserInputResponse => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("InboundDelegateMsgType::UserInputResponse", pos), + InboundDelegateMsgType::common_ApplicationMessage => v.verify_union_variant::>("InboundDelegateMsgType::common_ApplicationMessage", pos), + InboundDelegateMsgType::UserInputResponse => v.verify_union_variant::>("InboundDelegateMsgType::UserInputResponse", pos), _ => Ok(()), } })? @@ -2816,7 +2838,7 @@ pub mod client_request { } pub struct InboundDelegateMsgArgs { pub inbound_type: InboundDelegateMsgType, - pub inbound: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>, + pub inbound: Option>, } impl<'a> Default for InboundDelegateMsgArgs { #[inline] @@ -2828,11 +2850,11 @@ pub mod client_request { } } - pub struct InboundDelegateMsgBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct InboundDelegateMsgBuilder<'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> InboundDelegateMsgBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> InboundDelegateMsgBuilder<'a, 'b, A> { #[inline] pub fn add_inbound_type(&mut self, inbound_type: InboundDelegateMsgType) { self.fbb_.push_slot::( @@ -2844,16 +2866,16 @@ pub mod client_request { #[inline] pub fn add_inbound( &mut self, - inbound: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>, + inbound: flatbuffers::WIPOffset, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( InboundDelegateMsg::VT_INBOUND, inbound, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> InboundDelegateMsgBuilder<'a, 'b, A> { let start = _fbb.start_table(); InboundDelegateMsgBuilder { @@ -2862,16 +2884,16 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, InboundDelegateMsg::VT_INBOUND, "inbound"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for InboundDelegateMsg<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for InboundDelegateMsg<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("InboundDelegateMsg"); ds.field("inbound_type", &self.inbound_type()); match self.inbound_type() { @@ -2907,26 +2929,26 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct ApplicationMessages<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ApplicationMessages<'a> { + impl<'a> flatbuffers::Follow<'a> for ApplicationMessages<'a> { type Inner = ApplicationMessages<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ApplicationMessages<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_PARAMS: ::flatbuffers::VOffsetT = 6; - pub const VT_INBOUND: ::flatbuffers::VOffsetT = 8; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_PARAMS: flatbuffers::VOffsetT = 6; + pub const VT_INBOUND: flatbuffers::VOffsetT = 8; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ApplicationMessages { _tab: table } } #[allow(unused_mut)] @@ -2934,11 +2956,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ApplicationMessagesArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ApplicationMessagesBuilder::new(_fbb); if let Some(x) = args.inbound { builder.add_inbound(x); @@ -2959,7 +2981,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( ApplicationMessages::VT_KEY, None, ) @@ -2967,13 +2989,13 @@ pub mod client_request { } } #[inline] - pub fn params(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn params(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( ApplicationMessages::VT_PARAMS, None, ) @@ -2983,54 +3005,51 @@ pub mod client_request { #[inline] pub fn inbound( &self, - ) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>> - { + ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset< - ::flatbuffers::Vector< - 'a, - ::flatbuffers::ForwardsUOffset, - >, + .get::>, >>(ApplicationMessages::VT_INBOUND, None) .unwrap() } } } - impl ::flatbuffers::Verifiable for ApplicationMessages<'_> { + impl flatbuffers::Verifiable for ApplicationMessages<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "params", Self::VT_PARAMS, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset< - ::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset>, + .visit_field::>, >>("inbound", Self::VT_INBOUND, true)? .finish(); Ok(()) } } pub struct ApplicationMessagesArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset>>, - pub params: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub key: Option>>, + pub params: Option>>, pub inbound: Option< - ::flatbuffers::WIPOffset< - ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>>, + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, >, >, } @@ -3045,25 +3064,22 @@ pub mod client_request { } } - pub struct ApplicationMessagesBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ApplicationMessagesBuilder<'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> ApplicationMessagesBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ApplicationMessagesBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( ApplicationMessages::VT_KEY, key, ); } #[inline] - pub fn add_params( - &mut self, - params: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + pub fn add_params(&mut self, params: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( ApplicationMessages::VT_PARAMS, params, ); @@ -3071,18 +3087,18 @@ pub mod client_request { #[inline] pub fn add_inbound( &mut self, - inbound: ::flatbuffers::WIPOffset< - ::flatbuffers::Vector<'b, ::flatbuffers::ForwardsUOffset>>, + inbound: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, >, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( ApplicationMessages::VT_INBOUND, inbound, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ApplicationMessagesBuilder<'a, 'b, A> { let start = _fbb.start_table(); ApplicationMessagesBuilder { @@ -3091,19 +3107,19 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, ApplicationMessages::VT_KEY, "key"); self.fbb_ .required(o, ApplicationMessages::VT_PARAMS, "params"); self.fbb_ .required(o, ApplicationMessages::VT_INBOUND, "inbound"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ApplicationMessages<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ApplicationMessages<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ApplicationMessages"); ds.field("key", &self.key()); ds.field("params", &self.params()); @@ -3115,26 +3131,26 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct RegisterDelegate<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for RegisterDelegate<'a> { + impl<'a> flatbuffers::Follow<'a> for RegisterDelegate<'a> { type Inner = RegisterDelegate<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> RegisterDelegate<'a> { - pub const VT_DELEGATE: ::flatbuffers::VOffsetT = 4; - pub const VT_CIPHER: ::flatbuffers::VOffsetT = 6; - pub const VT_NONCE: ::flatbuffers::VOffsetT = 8; + pub const VT_DELEGATE: flatbuffers::VOffsetT = 4; + pub const VT_CIPHER: flatbuffers::VOffsetT = 6; + pub const VT_NONCE: flatbuffers::VOffsetT = 8; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { RegisterDelegate { _tab: table } } #[allow(unused_mut)] @@ -3142,11 +3158,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RegisterDelegateArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = RegisterDelegateBuilder::new(_fbb); if let Some(x) = args.nonce { builder.add_nonce(x); @@ -3167,7 +3183,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( RegisterDelegate::VT_DELEGATE, None, ) @@ -3175,13 +3191,13 @@ pub mod client_request { } } #[inline] - pub fn cipher(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn cipher(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( RegisterDelegate::VT_CIPHER, None, ) @@ -3189,13 +3205,13 @@ pub mod client_request { } } #[inline] - pub fn nonce(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn nonce(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( RegisterDelegate::VT_NONCE, None, ) @@ -3204,24 +3220,25 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for RegisterDelegate<'_> { + impl flatbuffers::Verifiable for RegisterDelegate<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "delegate", Self::VT_DELEGATE, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "cipher", Self::VT_CIPHER, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "nonce", Self::VT_NONCE, true, @@ -3231,9 +3248,9 @@ pub mod client_request { } } pub struct RegisterDelegateArgs<'a> { - pub delegate: Option<::flatbuffers::WIPOffset>>, - pub cipher: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub nonce: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub delegate: Option>>, + pub cipher: Option>>, + pub nonce: Option>>, } impl<'a> Default for RegisterDelegateArgs<'a> { #[inline] @@ -3246,40 +3263,32 @@ pub mod client_request { } } - pub struct RegisterDelegateBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct RegisterDelegateBuilder<'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> RegisterDelegateBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RegisterDelegateBuilder<'a, 'b, A> { #[inline] - pub fn add_delegate(&mut self, delegate: ::flatbuffers::WIPOffset>) { + pub fn add_delegate(&mut self, delegate: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( RegisterDelegate::VT_DELEGATE, delegate, ); } #[inline] - pub fn add_cipher( - &mut self, - cipher: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( - RegisterDelegate::VT_CIPHER, - cipher, - ); + pub fn add_cipher(&mut self, cipher: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(RegisterDelegate::VT_CIPHER, cipher); } #[inline] - pub fn add_nonce( - &mut self, - nonce: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { + pub fn add_nonce(&mut self, nonce: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(RegisterDelegate::VT_NONCE, nonce); + .push_slot_always::>(RegisterDelegate::VT_NONCE, nonce); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> RegisterDelegateBuilder<'a, 'b, A> { let start = _fbb.start_table(); RegisterDelegateBuilder { @@ -3288,18 +3297,18 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, RegisterDelegate::VT_DELEGATE, "delegate"); self.fbb_.required(o, RegisterDelegate::VT_CIPHER, "cipher"); self.fbb_.required(o, RegisterDelegate::VT_NONCE, "nonce"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for RegisterDelegate<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for RegisterDelegate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("RegisterDelegate"); ds.field("delegate", &self.delegate()); ds.field("cipher", &self.cipher()); @@ -3311,24 +3320,24 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct UnregisterDelegate<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for UnregisterDelegate<'a> { + impl<'a> flatbuffers::Follow<'a> for UnregisterDelegate<'a> { type Inner = UnregisterDelegate<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> UnregisterDelegate<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; + pub const VT_KEY: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { UnregisterDelegate { _tab: table } } #[allow(unused_mut)] @@ -3336,11 +3345,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args UnregisterDelegateArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = UnregisterDelegateBuilder::new(_fbb); if let Some(x) = args.key { builder.add_key(x); @@ -3355,7 +3364,7 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( UnregisterDelegate::VT_KEY, None, ) @@ -3364,14 +3373,15 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for UnregisterDelegate<'_> { + impl flatbuffers::Verifiable for UnregisterDelegate<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, @@ -3381,7 +3391,7 @@ pub mod client_request { } } pub struct UnregisterDelegateArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset>>, + pub key: Option>>, } impl<'a> Default for UnregisterDelegateArgs<'a> { #[inline] @@ -3392,22 +3402,22 @@ pub mod client_request { } } - pub struct UnregisterDelegateBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct UnregisterDelegateBuilder<'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> UnregisterDelegateBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UnregisterDelegateBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( UnregisterDelegate::VT_KEY, key, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> UnregisterDelegateBuilder<'a, 'b, A> { let start = _fbb.start_table(); UnregisterDelegateBuilder { @@ -3416,15 +3426,15 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, UnregisterDelegate::VT_KEY, "key"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for UnregisterDelegate<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for UnregisterDelegate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("UnregisterDelegate"); ds.field("key", &self.key()); ds.finish() @@ -3434,25 +3444,25 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct ContractRequest<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ContractRequest<'a> { + impl<'a> flatbuffers::Follow<'a> for ContractRequest<'a> { type Inner = ContractRequest<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ContractRequest<'a> { - pub const VT_CONTRACT_REQUEST_TYPE: ::flatbuffers::VOffsetT = 4; - pub const VT_CONTRACT_REQUEST: ::flatbuffers::VOffsetT = 6; + pub const VT_CONTRACT_REQUEST_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_CONTRACT_REQUEST: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ContractRequest { _tab: table } } #[allow(unused_mut)] @@ -3460,11 +3470,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ContractRequestArgs, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ContractRequestBuilder::new(_fbb); if let Some(x) = args.contract_request { builder.add_contract_request(x); @@ -3488,13 +3498,13 @@ pub mod client_request { } } #[inline] - pub fn contract_request(&self) -> ::flatbuffers::Table<'a> { + pub fn contract_request(&self) -> flatbuffers::Table<'a> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>( + .get::>>( ContractRequest::VT_CONTRACT_REQUEST, None, ) @@ -3558,12 +3568,13 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for ContractRequest<'_> { + impl flatbuffers::Verifiable for ContractRequest<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_union::( "contract_request_type", @@ -3573,22 +3584,22 @@ pub mod client_request { true, |key, v, pos| match key { ContractRequestType::Put => v - .verify_union_variant::<::flatbuffers::ForwardsUOffset>( + .verify_union_variant::>( "ContractRequestType::Put", pos, ), ContractRequestType::Update => v - .verify_union_variant::<::flatbuffers::ForwardsUOffset>( + .verify_union_variant::>( "ContractRequestType::Update", pos, ), ContractRequestType::Get => v - .verify_union_variant::<::flatbuffers::ForwardsUOffset>( + .verify_union_variant::>( "ContractRequestType::Get", pos, ), ContractRequestType::Subscribe => v - .verify_union_variant::<::flatbuffers::ForwardsUOffset>( + .verify_union_variant::>( "ContractRequestType::Subscribe", pos, ), @@ -3601,7 +3612,7 @@ pub mod client_request { } pub struct ContractRequestArgs { pub contract_request_type: ContractRequestType, - pub contract_request: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>, + pub contract_request: Option>, } impl<'a> Default for ContractRequestArgs { #[inline] @@ -3613,11 +3624,11 @@ pub mod client_request { } } - pub struct ContractRequestBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ContractRequestBuilder<'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> ContractRequestBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContractRequestBuilder<'a, 'b, A> { #[inline] pub fn add_contract_request_type(&mut self, contract_request_type: ContractRequestType) { self.fbb_.push_slot::( @@ -3629,16 +3640,16 @@ pub mod client_request { #[inline] pub fn add_contract_request( &mut self, - contract_request: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>, + contract_request: flatbuffers::WIPOffset, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( ContractRequest::VT_CONTRACT_REQUEST, contract_request, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ContractRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); ContractRequestBuilder { @@ -3647,16 +3658,16 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, ContractRequest::VT_CONTRACT_REQUEST, "contract_request"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ContractRequest<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ContractRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ContractRequest"); ds.field("contract_request_type", &self.contract_request_type()); match self.contract_request_type() { @@ -3712,25 +3723,25 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct DelegateRequest<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for DelegateRequest<'a> { + impl<'a> flatbuffers::Follow<'a> for DelegateRequest<'a> { type Inner = DelegateRequest<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> DelegateRequest<'a> { - pub const VT_DELEGATE_REQUEST_TYPE: ::flatbuffers::VOffsetT = 4; - pub const VT_DELEGATE_REQUEST: ::flatbuffers::VOffsetT = 6; + pub const VT_DELEGATE_REQUEST_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_DELEGATE_REQUEST: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { DelegateRequest { _tab: table } } #[allow(unused_mut)] @@ -3738,11 +3749,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args DelegateRequestArgs, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = DelegateRequestBuilder::new(_fbb); if let Some(x) = args.delegate_request { builder.add_delegate_request(x); @@ -3766,13 +3777,13 @@ pub mod client_request { } } #[inline] - pub fn delegate_request(&self) -> ::flatbuffers::Table<'a> { + pub fn delegate_request(&self) -> flatbuffers::Table<'a> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>( + .get::>>( DelegateRequest::VT_DELEGATE_REQUEST, None, ) @@ -3822,18 +3833,19 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for DelegateRequest<'_> { + impl flatbuffers::Verifiable for DelegateRequest<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_union::("delegate_request_type", Self::VT_DELEGATE_REQUEST_TYPE, "delegate_request", Self::VT_DELEGATE_REQUEST, true, |key, v, pos| { match key { - DelegateRequestType::ApplicationMessages => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("DelegateRequestType::ApplicationMessages", pos), - DelegateRequestType::RegisterDelegate => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("DelegateRequestType::RegisterDelegate", pos), - DelegateRequestType::UnregisterDelegate => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("DelegateRequestType::UnregisterDelegate", pos), + DelegateRequestType::ApplicationMessages => v.verify_union_variant::>("DelegateRequestType::ApplicationMessages", pos), + DelegateRequestType::RegisterDelegate => v.verify_union_variant::>("DelegateRequestType::RegisterDelegate", pos), + DelegateRequestType::UnregisterDelegate => v.verify_union_variant::>("DelegateRequestType::UnregisterDelegate", pos), _ => Ok(()), } })? @@ -3843,7 +3855,7 @@ pub mod client_request { } pub struct DelegateRequestArgs { pub delegate_request_type: DelegateRequestType, - pub delegate_request: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>, + pub delegate_request: Option>, } impl<'a> Default for DelegateRequestArgs { #[inline] @@ -3855,11 +3867,11 @@ pub mod client_request { } } - pub struct DelegateRequestBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct DelegateRequestBuilder<'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> DelegateRequestBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DelegateRequestBuilder<'a, 'b, A> { #[inline] pub fn add_delegate_request_type(&mut self, delegate_request_type: DelegateRequestType) { self.fbb_.push_slot::( @@ -3871,16 +3883,16 @@ pub mod client_request { #[inline] pub fn add_delegate_request( &mut self, - delegate_request: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>, + delegate_request: flatbuffers::WIPOffset, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( DelegateRequest::VT_DELEGATE_REQUEST, delegate_request, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> DelegateRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); DelegateRequestBuilder { @@ -3889,16 +3901,16 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, DelegateRequest::VT_DELEGATE_REQUEST, "delegate_request"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for DelegateRequest<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for DelegateRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DelegateRequest"); ds.field("delegate_request_type", &self.delegate_request_type()); match self.delegate_request_type() { @@ -3944,24 +3956,24 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct Disconnect<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for Disconnect<'a> { + impl<'a> flatbuffers::Follow<'a> for Disconnect<'a> { type Inner = Disconnect<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> Disconnect<'a> { - pub const VT_CAUSE: ::flatbuffers::VOffsetT = 4; + pub const VT_CAUSE: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Disconnect { _tab: table } } #[allow(unused_mut)] @@ -3969,11 +3981,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args DisconnectArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = DisconnectBuilder::new(_fbb); if let Some(x) = args.cause { builder.add_cause(x); @@ -3988,29 +4000,26 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<&str>>(Disconnect::VT_CAUSE, None) + .get::>(Disconnect::VT_CAUSE, None) } } } - impl ::flatbuffers::Verifiable for Disconnect<'_> { + impl flatbuffers::Verifiable for Disconnect<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<&str>>( - "cause", - Self::VT_CAUSE, - false, - )? + .visit_field::>("cause", Self::VT_CAUSE, false)? .finish(); Ok(()) } } pub struct DisconnectArgs<'a> { - pub cause: Option<::flatbuffers::WIPOffset<&'a str>>, + pub cause: Option>, } impl<'a> Default for DisconnectArgs<'a> { #[inline] @@ -4019,19 +4028,19 @@ pub mod client_request { } } - pub struct DisconnectBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct DisconnectBuilder<'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> DisconnectBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DisconnectBuilder<'a, 'b, A> { #[inline] - pub fn add_cause(&mut self, cause: ::flatbuffers::WIPOffset<&'b str>) { + pub fn add_cause(&mut self, cause: flatbuffers::WIPOffset<&'b str>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(Disconnect::VT_CAUSE, cause); + .push_slot_always::>(Disconnect::VT_CAUSE, cause); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> DisconnectBuilder<'a, 'b, A> { let start = _fbb.start_table(); DisconnectBuilder { @@ -4040,14 +4049,14 @@ pub mod client_request { } } #[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()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for Disconnect<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for Disconnect<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Disconnect"); ds.field("cause", &self.cause()); ds.finish() @@ -4057,24 +4066,24 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct Authenticate<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for Authenticate<'a> { + impl<'a> flatbuffers::Follow<'a> for Authenticate<'a> { type Inner = Authenticate<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> Authenticate<'a> { - pub const VT_TOKEN: ::flatbuffers::VOffsetT = 4; + pub const VT_TOKEN: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Authenticate { _tab: table } } #[allow(unused_mut)] @@ -4082,11 +4091,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args AuthenticateArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = AuthenticateBuilder::new(_fbb); if let Some(x) = args.token { builder.add_token(x); @@ -4101,26 +4110,27 @@ pub mod client_request { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<&str>>(Authenticate::VT_TOKEN, None) + .get::>(Authenticate::VT_TOKEN, None) .unwrap() } } } - impl ::flatbuffers::Verifiable for Authenticate<'_> { + impl flatbuffers::Verifiable for Authenticate<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("token", Self::VT_TOKEN, true)? + .visit_field::>("token", Self::VT_TOKEN, true)? .finish(); Ok(()) } } pub struct AuthenticateArgs<'a> { - pub token: Option<::flatbuffers::WIPOffset<&'a str>>, + pub token: Option>, } impl<'a> Default for AuthenticateArgs<'a> { #[inline] @@ -4131,19 +4141,19 @@ pub mod client_request { } } - pub struct AuthenticateBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct AuthenticateBuilder<'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> AuthenticateBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AuthenticateBuilder<'a, 'b, A> { #[inline] - pub fn add_token(&mut self, token: ::flatbuffers::WIPOffset<&'b str>) { + pub fn add_token(&mut self, token: flatbuffers::WIPOffset<&'b str>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(Authenticate::VT_TOKEN, token); + .push_slot_always::>(Authenticate::VT_TOKEN, token); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> AuthenticateBuilder<'a, 'b, A> { let start = _fbb.start_table(); AuthenticateBuilder { @@ -4152,15 +4162,15 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, Authenticate::VT_TOKEN, "token"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for Authenticate<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for Authenticate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Authenticate"); ds.field("token", &self.token()); ds.finish() @@ -4170,27 +4180,27 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct StreamChunk<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for StreamChunk<'a> { + impl<'a> flatbuffers::Follow<'a> for StreamChunk<'a> { type Inner = StreamChunk<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> StreamChunk<'a> { - pub const VT_STREAM_ID: ::flatbuffers::VOffsetT = 4; - pub const VT_INDEX: ::flatbuffers::VOffsetT = 6; - pub const VT_TOTAL: ::flatbuffers::VOffsetT = 8; - pub const VT_DATA: ::flatbuffers::VOffsetT = 10; + pub const VT_STREAM_ID: flatbuffers::VOffsetT = 4; + pub const VT_INDEX: flatbuffers::VOffsetT = 6; + pub const VT_TOTAL: flatbuffers::VOffsetT = 8; + pub const VT_DATA: flatbuffers::VOffsetT = 10; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { StreamChunk { _tab: table } } #[allow(unused_mut)] @@ -4198,11 +4208,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args StreamChunkArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = StreamChunkBuilder::new(_fbb); if let Some(x) = args.data { builder.add_data(x); @@ -4247,13 +4257,13 @@ pub mod client_request { } } #[inline] - pub fn data(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn data(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( StreamChunk::VT_DATA, None, ) @@ -4262,17 +4272,18 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for StreamChunk<'_> { + impl flatbuffers::Verifiable for StreamChunk<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_field::("stream_id", Self::VT_STREAM_ID, false)? .visit_field::("index", Self::VT_INDEX, false)? .visit_field::("total", Self::VT_TOTAL, false)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "data", Self::VT_DATA, true, @@ -4285,7 +4296,7 @@ pub mod client_request { pub stream_id: u32, pub index: u32, pub total: u32, - pub data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub data: Option>>, } impl<'a> Default for StreamChunkArgs<'a> { #[inline] @@ -4299,11 +4310,11 @@ pub mod client_request { } } - pub struct StreamChunkBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct StreamChunkBuilder<'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> StreamChunkBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StreamChunkBuilder<'a, 'b, A> { #[inline] pub fn add_stream_id(&mut self, stream_id: u32) { self.fbb_ @@ -4318,13 +4329,13 @@ pub mod client_request { self.fbb_.push_slot::(StreamChunk::VT_TOTAL, total, 0); } #[inline] - pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(StreamChunk::VT_DATA, data); + .push_slot_always::>(StreamChunk::VT_DATA, data); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> StreamChunkBuilder<'a, 'b, A> { let start = _fbb.start_table(); StreamChunkBuilder { @@ -4333,15 +4344,15 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, StreamChunk::VT_DATA, "data"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for StreamChunk<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for StreamChunk<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("StreamChunk"); ds.field("stream_id", &self.stream_id()); ds.field("index", &self.index()); @@ -4354,25 +4365,25 @@ pub mod client_request { #[derive(Copy, Clone, PartialEq)] pub struct ClientRequest<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ClientRequest<'a> { + impl<'a> flatbuffers::Follow<'a> for ClientRequest<'a> { type Inner = ClientRequest<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ClientRequest<'a> { - pub const VT_CLIENT_REQUEST_TYPE: ::flatbuffers::VOffsetT = 4; - pub const VT_CLIENT_REQUEST: ::flatbuffers::VOffsetT = 6; + pub const VT_CLIENT_REQUEST_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_CLIENT_REQUEST: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ClientRequest { _tab: table } } #[allow(unused_mut)] @@ -4380,11 +4391,11 @@ pub mod client_request { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ClientRequestArgs, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ClientRequestBuilder::new(_fbb); if let Some(x) = args.client_request { builder.add_client_request(x); @@ -4408,13 +4419,13 @@ pub mod client_request { } } #[inline] - pub fn client_request(&self) -> ::flatbuffers::Table<'a> { + pub fn client_request(&self) -> flatbuffers::Table<'a> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>( + .get::>>( ClientRequest::VT_CLIENT_REQUEST, None, ) @@ -4492,30 +4503,56 @@ pub mod client_request { } } - impl ::flatbuffers::Verifiable for ClientRequest<'_> { + impl flatbuffers::Verifiable for ClientRequest<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_union::("client_request_type", Self::VT_CLIENT_REQUEST_TYPE, "client_request", Self::VT_CLIENT_REQUEST, true, |key, v, pos| { - match key { - ClientRequestType::ContractRequest => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("ClientRequestType::ContractRequest", pos), - ClientRequestType::DelegateRequest => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("ClientRequestType::DelegateRequest", pos), - ClientRequestType::Disconnect => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("ClientRequestType::Disconnect", pos), - ClientRequestType::Authenticate => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("ClientRequestType::Authenticate", pos), - ClientRequestType::StreamChunk => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("ClientRequestType::StreamChunk", pos), - _ => Ok(()), - } - })? - .finish(); + .visit_union::( + "client_request_type", + Self::VT_CLIENT_REQUEST_TYPE, + "client_request", + Self::VT_CLIENT_REQUEST, + true, + |key, v, pos| match key { + ClientRequestType::ContractRequest => v + .verify_union_variant::>( + "ClientRequestType::ContractRequest", + pos, + ), + ClientRequestType::DelegateRequest => v + .verify_union_variant::>( + "ClientRequestType::DelegateRequest", + pos, + ), + ClientRequestType::Disconnect => v + .verify_union_variant::>( + "ClientRequestType::Disconnect", + pos, + ), + ClientRequestType::Authenticate => v + .verify_union_variant::>( + "ClientRequestType::Authenticate", + pos, + ), + ClientRequestType::StreamChunk => v + .verify_union_variant::>( + "ClientRequestType::StreamChunk", + pos, + ), + _ => Ok(()), + }, + )? + .finish(); Ok(()) } } pub struct ClientRequestArgs { pub client_request_type: ClientRequestType, - pub client_request: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>, + pub client_request: Option>, } impl<'a> Default for ClientRequestArgs { #[inline] @@ -4527,11 +4564,11 @@ pub mod client_request { } } - pub struct ClientRequestBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ClientRequestBuilder<'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> ClientRequestBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ClientRequestBuilder<'a, 'b, A> { #[inline] pub fn add_client_request_type(&mut self, client_request_type: ClientRequestType) { self.fbb_.push_slot::( @@ -4543,16 +4580,16 @@ pub mod client_request { #[inline] pub fn add_client_request( &mut self, - client_request: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>, + client_request: flatbuffers::WIPOffset, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( ClientRequest::VT_CLIENT_REQUEST, client_request, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ClientRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); ClientRequestBuilder { @@ -4561,16 +4598,16 @@ pub mod client_request { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, ClientRequest::VT_CLIENT_REQUEST, "client_request"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ClientRequest<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ClientRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ClientRequest"); ds.field("client_request_type", &self.client_request_type()); match self.client_request_type() { @@ -4641,8 +4678,8 @@ pub mod client_request { /// `root_as_client_request_unchecked`. pub fn root_as_client_request( buf: &[u8], - ) -> Result, ::flatbuffers::InvalidFlatbuffer> { - ::flatbuffers::root::(buf) + ) -> Result { + flatbuffers::root::(buf) } #[inline] /// Verifies that a buffer of bytes contains a size prefixed @@ -4653,8 +4690,8 @@ pub mod client_request { /// `size_prefixed_root_as_client_request_unchecked`. pub fn size_prefixed_root_as_client_request( buf: &[u8], - ) -> Result, ::flatbuffers::InvalidFlatbuffer> { - ::flatbuffers::size_prefixed_root::(buf) + ) -> Result { + flatbuffers::size_prefixed_root::(buf) } #[inline] /// Verifies, with the given options, that a buffer of bytes @@ -4664,10 +4701,10 @@ pub mod client_request { /// previous, unchecked, behavior use /// `root_as_client_request_unchecked`. pub fn root_as_client_request_with_opts<'b, 'o>( - opts: &'o ::flatbuffers::VerifierOptions, + opts: &'o flatbuffers::VerifierOptions, buf: &'b [u8], - ) -> Result, ::flatbuffers::InvalidFlatbuffer> { - ::flatbuffers::root_with_opts::>(opts, buf) + ) -> Result, flatbuffers::InvalidFlatbuffer> { + flatbuffers::root_with_opts::>(opts, buf) } #[inline] /// Verifies, with the given verifier options, that a buffer of @@ -4677,37 +4714,37 @@ pub mod client_request { /// previous, unchecked, behavior use /// `root_as_client_request_unchecked`. pub fn size_prefixed_root_as_client_request_with_opts<'b, 'o>( - opts: &'o ::flatbuffers::VerifierOptions, + opts: &'o flatbuffers::VerifierOptions, buf: &'b [u8], - ) -> Result, ::flatbuffers::InvalidFlatbuffer> { - ::flatbuffers::size_prefixed_root_with_opts::>(opts, buf) + ) -> Result, flatbuffers::InvalidFlatbuffer> { + flatbuffers::size_prefixed_root_with_opts::>(opts, buf) } #[inline] /// Assumes, without verification, that a buffer of bytes contains a ClientRequest and returns it. /// # Safety /// Callers must trust the given bytes do indeed contain a valid `ClientRequest`. - pub unsafe fn root_as_client_request_unchecked(buf: &[u8]) -> ClientRequest<'_> { - unsafe { ::flatbuffers::root_unchecked::(buf) } + pub unsafe fn root_as_client_request_unchecked(buf: &[u8]) -> ClientRequest { + flatbuffers::root_unchecked::(buf) } #[inline] /// Assumes, without verification, that a buffer of bytes contains a size prefixed ClientRequest and returns it. /// # Safety /// Callers must trust the given bytes do indeed contain a valid size prefixed `ClientRequest`. - pub unsafe fn size_prefixed_root_as_client_request_unchecked(buf: &[u8]) -> ClientRequest<'_> { - unsafe { ::flatbuffers::size_prefixed_root_unchecked::(buf) } + pub unsafe fn size_prefixed_root_as_client_request_unchecked(buf: &[u8]) -> ClientRequest { + flatbuffers::size_prefixed_root_unchecked::(buf) } #[inline] - pub fn finish_client_request_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>( - fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - root: ::flatbuffers::WIPOffset>, + pub fn finish_client_request_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>( + fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + root: flatbuffers::WIPOffset>, ) { fbb.finish(root, None); } #[inline] - pub fn finish_size_prefixed_client_request_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>( - fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - root: ::flatbuffers::WIPOffset>, + pub fn finish_size_prefixed_client_request_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>( + fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + root: flatbuffers::WIPOffset>, ) { fbb.finish_size_prefixed(root, None); } diff --git a/rust/src/generated/common_generated.rs b/rust/src/generated/common_generated.rs index 2064811..923e4d8 100644 --- a/rust/src/generated/common_generated.rs +++ b/rust/src/generated/common_generated.rs @@ -1,10 +1,22 @@ // automatically generated by the FlatBuffers compiler, do not modify + // @generated -extern crate alloc; + +use core::cmp::Ordering; +use core::mem; + +extern crate flatbuffers; +use self::flatbuffers::{EndianScalar, Follow}; #[allow(unused_imports, dead_code)] pub mod common { + use core::cmp::Ordering; + use core::mem; + + extern crate flatbuffers; + use self::flatbuffers::{EndianScalar, Follow}; + #[deprecated( since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021." @@ -43,8 +55,8 @@ pub mod common { } } } - impl ::core::fmt::Debug for ContractType { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { + impl core::fmt::Debug for ContractType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { @@ -52,24 +64,24 @@ pub mod common { } } } - impl<'a> ::flatbuffers::Follow<'a> for ContractType { + impl<'a> flatbuffers::Follow<'a> for ContractType { type Inner = Self; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { ::flatbuffers::read_scalar_at::(buf, loc) }; + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } - impl ::flatbuffers::Push for ContractType { + impl flatbuffers::Push for ContractType { type Output = ContractType; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - unsafe { ::flatbuffers::emplace_scalar::(dst, self.0) }; + flatbuffers::emplace_scalar::(dst, self.0); } } - impl ::flatbuffers::EndianScalar for ContractType { + impl flatbuffers::EndianScalar for ContractType { type Scalar = u8; #[inline] fn to_little_endian(self) -> u8 { @@ -83,17 +95,18 @@ pub mod common { } } - impl<'a> ::flatbuffers::Verifiable for ContractType { + impl<'a> flatbuffers::Verifiable for ContractType { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; u8::run_verifier(v, pos) } } - impl ::flatbuffers::SimpleToVerifyInSlice for ContractType {} + impl flatbuffers::SimpleToVerifyInSlice for ContractType {} pub struct ContractTypeUnionTableOffset {} #[deprecated( @@ -159,8 +172,8 @@ pub mod common { } } } - impl ::core::fmt::Debug for UpdateDataType { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { + impl core::fmt::Debug for UpdateDataType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { @@ -168,24 +181,24 @@ pub mod common { } } } - impl<'a> ::flatbuffers::Follow<'a> for UpdateDataType { + impl<'a> flatbuffers::Follow<'a> for UpdateDataType { type Inner = Self; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { ::flatbuffers::read_scalar_at::(buf, loc) }; + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } - impl ::flatbuffers::Push for UpdateDataType { + impl flatbuffers::Push for UpdateDataType { type Output = UpdateDataType; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - unsafe { ::flatbuffers::emplace_scalar::(dst, self.0) }; + flatbuffers::emplace_scalar::(dst, self.0); } } - impl ::flatbuffers::EndianScalar for UpdateDataType { + impl flatbuffers::EndianScalar for UpdateDataType { type Scalar = u8; #[inline] fn to_little_endian(self) -> u8 { @@ -199,41 +212,42 @@ pub mod common { } } - impl<'a> ::flatbuffers::Verifiable for UpdateDataType { + impl<'a> flatbuffers::Verifiable for UpdateDataType { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; u8::run_verifier(v, pos) } } - impl ::flatbuffers::SimpleToVerifyInSlice for UpdateDataType {} + impl flatbuffers::SimpleToVerifyInSlice for UpdateDataType {} pub struct UpdateDataTypeUnionTableOffset {} pub enum ContractInstanceIdOffset {} #[derive(Copy, Clone, PartialEq)] pub struct ContractInstanceId<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ContractInstanceId<'a> { + impl<'a> flatbuffers::Follow<'a> for ContractInstanceId<'a> { type Inner = ContractInstanceId<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ContractInstanceId<'a> { - pub const VT_DATA: ::flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ContractInstanceId { _tab: table } } #[allow(unused_mut)] @@ -241,11 +255,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ContractInstanceIdArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ContractInstanceIdBuilder::new(_fbb); if let Some(x) = args.data { builder.add_data(x); @@ -254,13 +268,13 @@ pub mod common { } #[inline] - pub fn data(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn data(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( ContractInstanceId::VT_DATA, None, ) @@ -269,14 +283,15 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for ContractInstanceId<'_> { + impl flatbuffers::Verifiable for ContractInstanceId<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "data", Self::VT_DATA, true, @@ -286,7 +301,7 @@ pub mod common { } } pub struct ContractInstanceIdArgs<'a> { - pub data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub data: Option>>, } impl<'a> Default for ContractInstanceIdArgs<'a> { #[inline] @@ -297,19 +312,19 @@ pub mod common { } } - pub struct ContractInstanceIdBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ContractInstanceIdBuilder<'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> ContractInstanceIdBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContractInstanceIdBuilder<'a, 'b, A> { #[inline] - pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(ContractInstanceId::VT_DATA, data); + .push_slot_always::>(ContractInstanceId::VT_DATA, data); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ContractInstanceIdBuilder<'a, 'b, A> { let start = _fbb.start_table(); ContractInstanceIdBuilder { @@ -318,15 +333,15 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, ContractInstanceId::VT_DATA, "data"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ContractInstanceId<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ContractInstanceId<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ContractInstanceId"); ds.field("data", &self.data()); ds.finish() @@ -336,25 +351,25 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct ContractKey<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ContractKey<'a> { + impl<'a> flatbuffers::Follow<'a> for ContractKey<'a> { type Inner = ContractKey<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ContractKey<'a> { - pub const VT_INSTANCE: ::flatbuffers::VOffsetT = 4; - pub const VT_CODE: ::flatbuffers::VOffsetT = 6; + pub const VT_INSTANCE: flatbuffers::VOffsetT = 4; + pub const VT_CODE: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ContractKey { _tab: table } } #[allow(unused_mut)] @@ -362,11 +377,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ContractKeyArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ContractKeyBuilder::new(_fbb); if let Some(x) = args.code { builder.add_code(x); @@ -384,7 +399,7 @@ pub mod common { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( ContractKey::VT_INSTANCE, None, ) @@ -392,13 +407,13 @@ pub mod common { } } #[inline] - pub fn code(&self) -> Option<::flatbuffers::Vector<'a, u8>> { + pub fn code(&self) -> Option> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( ContractKey::VT_CODE, None, ) @@ -406,19 +421,20 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for ContractKey<'_> { + impl flatbuffers::Verifiable for ContractKey<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "instance", Self::VT_INSTANCE, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "code", Self::VT_CODE, false, @@ -428,8 +444,8 @@ pub mod common { } } pub struct ContractKeyArgs<'a> { - pub instance: Option<::flatbuffers::WIPOffset>>, - pub code: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub instance: Option>>, + pub code: Option>>, } impl<'a> Default for ContractKeyArgs<'a> { #[inline] @@ -441,27 +457,27 @@ pub mod common { } } - pub struct ContractKeyBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ContractKeyBuilder<'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> ContractKeyBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContractKeyBuilder<'a, 'b, A> { #[inline] - pub fn add_instance(&mut self, instance: ::flatbuffers::WIPOffset>) { + pub fn add_instance(&mut self, instance: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( ContractKey::VT_INSTANCE, instance, ); } #[inline] - pub fn add_code(&mut self, code: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_code(&mut self, code: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(ContractKey::VT_CODE, code); + .push_slot_always::>(ContractKey::VT_CODE, code); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ContractKeyBuilder<'a, 'b, A> { let start = _fbb.start_table(); ContractKeyBuilder { @@ -470,15 +486,15 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, ContractKey::VT_INSTANCE, "instance"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ContractKey<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ContractKey<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ContractKey"); ds.field("instance", &self.instance()); ds.field("code", &self.code()); @@ -489,25 +505,25 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct SecretsId<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for SecretsId<'a> { + impl<'a> flatbuffers::Follow<'a> for SecretsId<'a> { type Inner = SecretsId<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> SecretsId<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_HASH: ::flatbuffers::VOffsetT = 6; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_HASH: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { SecretsId { _tab: table } } #[allow(unused_mut)] @@ -515,11 +531,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SecretsIdArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = SecretsIdBuilder::new(_fbb); if let Some(x) = args.hash { builder.add_hash(x); @@ -531,13 +547,13 @@ pub mod common { } #[inline] - pub fn key(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn key(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( SecretsId::VT_KEY, None, ) @@ -545,13 +561,13 @@ pub mod common { } } #[inline] - pub fn hash(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn hash(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( SecretsId::VT_HASH, None, ) @@ -560,19 +576,20 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for SecretsId<'_> { + impl flatbuffers::Verifiable for SecretsId<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "key", Self::VT_KEY, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "hash", Self::VT_HASH, true, @@ -582,8 +599,8 @@ pub mod common { } } pub struct SecretsIdArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub hash: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub key: Option>>, + pub hash: Option>>, } impl<'a> Default for SecretsIdArgs<'a> { #[inline] @@ -595,24 +612,24 @@ pub mod common { } } - pub struct SecretsIdBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct SecretsIdBuilder<'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> SecretsIdBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SecretsIdBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(SecretsId::VT_KEY, key); + .push_slot_always::>(SecretsId::VT_KEY, key); } #[inline] - pub fn add_hash(&mut self, hash: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_hash(&mut self, hash: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(SecretsId::VT_HASH, hash); + .push_slot_always::>(SecretsId::VT_HASH, hash); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> SecretsIdBuilder<'a, 'b, A> { let start = _fbb.start_table(); SecretsIdBuilder { @@ -621,16 +638,16 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, SecretsId::VT_KEY, "key"); self.fbb_.required(o, SecretsId::VT_HASH, "hash"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for SecretsId<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for SecretsId<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SecretsId"); ds.field("key", &self.key()); ds.field("hash", &self.hash()); @@ -641,25 +658,25 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct ContractCode<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ContractCode<'a> { + impl<'a> flatbuffers::Follow<'a> for ContractCode<'a> { type Inner = ContractCode<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ContractCode<'a> { - pub const VT_DATA: ::flatbuffers::VOffsetT = 4; - pub const VT_CODE_HASH: ::flatbuffers::VOffsetT = 6; + pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_CODE_HASH: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ContractCode { _tab: table } } #[allow(unused_mut)] @@ -667,11 +684,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ContractCodeArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ContractCodeBuilder::new(_fbb); if let Some(x) = args.code_hash { builder.add_code_hash(x); @@ -683,13 +700,13 @@ pub mod common { } #[inline] - pub fn data(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn data(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( ContractCode::VT_DATA, None, ) @@ -697,13 +714,13 @@ pub mod common { } } #[inline] - pub fn code_hash(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn code_hash(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( ContractCode::VT_CODE_HASH, None, ) @@ -712,19 +729,20 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for ContractCode<'_> { + impl flatbuffers::Verifiable for ContractCode<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "data", Self::VT_DATA, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "code_hash", Self::VT_CODE_HASH, true, @@ -734,8 +752,8 @@ pub mod common { } } pub struct ContractCodeArgs<'a> { - pub data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub code_hash: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub data: Option>>, + pub code_hash: Option>>, } impl<'a> Default for ContractCodeArgs<'a> { #[inline] @@ -747,29 +765,29 @@ pub mod common { } } - pub struct ContractCodeBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ContractCodeBuilder<'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> ContractCodeBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContractCodeBuilder<'a, 'b, A> { #[inline] - pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(ContractCode::VT_DATA, data); + .push_slot_always::>(ContractCode::VT_DATA, data); } #[inline] pub fn add_code_hash( &mut self, - code_hash: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + code_hash: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( ContractCode::VT_CODE_HASH, code_hash, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ContractCodeBuilder<'a, 'b, A> { let start = _fbb.start_table(); ContractCodeBuilder { @@ -778,17 +796,17 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, ContractCode::VT_DATA, "data"); self.fbb_ .required(o, ContractCode::VT_CODE_HASH, "code_hash"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ContractCode<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ContractCode<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ContractCode"); ds.field("data", &self.data()); ds.field("code_hash", &self.code_hash()); @@ -799,26 +817,26 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct ApplicationMessage<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ApplicationMessage<'a> { + impl<'a> flatbuffers::Follow<'a> for ApplicationMessage<'a> { type Inner = ApplicationMessage<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ApplicationMessage<'a> { - pub const VT_PAYLOAD: ::flatbuffers::VOffsetT = 4; - pub const VT_CONTEXT: ::flatbuffers::VOffsetT = 6; - pub const VT_PROCESSED: ::flatbuffers::VOffsetT = 8; + pub const VT_PAYLOAD: flatbuffers::VOffsetT = 4; + pub const VT_CONTEXT: flatbuffers::VOffsetT = 6; + pub const VT_PROCESSED: flatbuffers::VOffsetT = 8; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ApplicationMessage { _tab: table } } #[allow(unused_mut)] @@ -826,11 +844,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ApplicationMessageArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ApplicationMessageBuilder::new(_fbb); if let Some(x) = args.context { builder.add_context(x); @@ -843,13 +861,13 @@ pub mod common { } #[inline] - pub fn payload(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn payload(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( ApplicationMessage::VT_PAYLOAD, None, ) @@ -857,13 +875,13 @@ pub mod common { } } #[inline] - pub fn context(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn context(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( ApplicationMessage::VT_CONTEXT, None, ) @@ -883,19 +901,20 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for ApplicationMessage<'_> { + impl flatbuffers::Verifiable for ApplicationMessage<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "payload", Self::VT_PAYLOAD, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "context", Self::VT_CONTEXT, true, @@ -906,8 +925,8 @@ pub mod common { } } pub struct ApplicationMessageArgs<'a> { - pub payload: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub context: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub payload: Option>>, + pub context: Option>>, pub processed: bool, } impl<'a> Default for ApplicationMessageArgs<'a> { @@ -921,17 +940,17 @@ pub mod common { } } - pub struct ApplicationMessageBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ApplicationMessageBuilder<'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> ApplicationMessageBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ApplicationMessageBuilder<'a, 'b, A> { #[inline] pub fn add_payload( &mut self, - payload: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + payload: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( ApplicationMessage::VT_PAYLOAD, payload, ); @@ -939,9 +958,9 @@ pub mod common { #[inline] pub fn add_context( &mut self, - context: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + context: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( ApplicationMessage::VT_CONTEXT, context, ); @@ -953,7 +972,7 @@ pub mod common { } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ApplicationMessageBuilder<'a, 'b, A> { let start = _fbb.start_table(); ApplicationMessageBuilder { @@ -962,18 +981,18 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, ApplicationMessage::VT_PAYLOAD, "payload"); self.fbb_ .required(o, ApplicationMessage::VT_CONTEXT, "context"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ApplicationMessage<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ApplicationMessage<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ApplicationMessage"); ds.field("payload", &self.payload()); ds.field("context", &self.context()); @@ -985,26 +1004,26 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct WasmContractV1<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for WasmContractV1<'a> { + impl<'a> flatbuffers::Follow<'a> for WasmContractV1<'a> { type Inner = WasmContractV1<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> WasmContractV1<'a> { - pub const VT_DATA: ::flatbuffers::VOffsetT = 4; - pub const VT_PARAMETERS: ::flatbuffers::VOffsetT = 6; - pub const VT_KEY: ::flatbuffers::VOffsetT = 8; + pub const VT_DATA: flatbuffers::VOffsetT = 4; + pub const VT_PARAMETERS: flatbuffers::VOffsetT = 6; + pub const VT_KEY: flatbuffers::VOffsetT = 8; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { WasmContractV1 { _tab: table } } #[allow(unused_mut)] @@ -1012,11 +1031,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args WasmContractV1Args<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = WasmContractV1Builder::new(_fbb); if let Some(x) = args.key { builder.add_key(x); @@ -1037,7 +1056,7 @@ pub mod common { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( WasmContractV1::VT_DATA, None, ) @@ -1045,13 +1064,13 @@ pub mod common { } } #[inline] - pub fn parameters(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn parameters(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( WasmContractV1::VT_PARAMETERS, None, ) @@ -1065,33 +1084,31 @@ pub mod common { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( - WasmContractV1::VT_KEY, - None, - ) + .get::>(WasmContractV1::VT_KEY, None) .unwrap() } } } - impl ::flatbuffers::Verifiable for WasmContractV1<'_> { + impl flatbuffers::Verifiable for WasmContractV1<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "data", Self::VT_DATA, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "parameters", Self::VT_PARAMETERS, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, @@ -1101,9 +1118,9 @@ pub mod common { } } pub struct WasmContractV1Args<'a> { - pub data: Option<::flatbuffers::WIPOffset>>, - pub parameters: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub key: Option<::flatbuffers::WIPOffset>>, + pub data: Option>>, + pub parameters: Option>>, + pub key: Option>>, } impl<'a> Default for WasmContractV1Args<'a> { #[inline] @@ -1116,15 +1133,15 @@ pub mod common { } } - pub struct WasmContractV1Builder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct WasmContractV1Builder<'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> WasmContractV1Builder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WasmContractV1Builder<'a, 'b, A> { #[inline] - pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset>) { + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( WasmContractV1::VT_DATA, data, ); @@ -1132,24 +1149,24 @@ pub mod common { #[inline] pub fn add_parameters( &mut self, - parameters: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + parameters: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( WasmContractV1::VT_PARAMETERS, parameters, ); } #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( WasmContractV1::VT_KEY, key, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> WasmContractV1Builder<'a, 'b, A> { let start = _fbb.start_table(); WasmContractV1Builder { @@ -1158,18 +1175,18 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, WasmContractV1::VT_DATA, "data"); self.fbb_ .required(o, WasmContractV1::VT_PARAMETERS, "parameters"); self.fbb_.required(o, WasmContractV1::VT_KEY, "key"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for WasmContractV1<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for WasmContractV1<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("WasmContractV1"); ds.field("data", &self.data()); ds.field("parameters", &self.parameters()); @@ -1181,25 +1198,25 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct ContractContainer<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ContractContainer<'a> { + impl<'a> flatbuffers::Follow<'a> for ContractContainer<'a> { type Inner = ContractContainer<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ContractContainer<'a> { - pub const VT_CONTRACT_TYPE: ::flatbuffers::VOffsetT = 4; - pub const VT_CONTRACT: ::flatbuffers::VOffsetT = 6; + pub const VT_CONTRACT_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_CONTRACT: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ContractContainer { _tab: table } } #[allow(unused_mut)] @@ -1207,11 +1224,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ContractContainerArgs, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ContractContainerBuilder::new(_fbb); if let Some(x) = args.contract { builder.add_contract(x); @@ -1235,13 +1252,13 @@ pub mod common { } } #[inline] - pub fn contract(&self) -> ::flatbuffers::Table<'a> { + pub fn contract(&self) -> flatbuffers::Table<'a> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>( + .get::>>( ContractContainer::VT_CONTRACT, None, ) @@ -1263,12 +1280,13 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for ContractContainer<'_> { + impl flatbuffers::Verifiable for ContractContainer<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_union::( "contract_type", @@ -1278,7 +1296,7 @@ pub mod common { true, |key, v, pos| match key { ContractType::WasmContractV1 => v - .verify_union_variant::<::flatbuffers::ForwardsUOffset>( + .verify_union_variant::>( "ContractType::WasmContractV1", pos, ), @@ -1291,7 +1309,7 @@ pub mod common { } pub struct ContractContainerArgs { pub contract_type: ContractType, - pub contract: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>, + pub contract: Option>, } impl<'a> Default for ContractContainerArgs { #[inline] @@ -1303,11 +1321,11 @@ pub mod common { } } - pub struct ContractContainerBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ContractContainerBuilder<'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> ContractContainerBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContractContainerBuilder<'a, 'b, A> { #[inline] pub fn add_contract_type(&mut self, contract_type: ContractType) { self.fbb_.push_slot::( @@ -1319,16 +1337,16 @@ pub mod common { #[inline] pub fn add_contract( &mut self, - contract: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>, + contract: flatbuffers::WIPOffset, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( ContractContainer::VT_CONTRACT, contract, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ContractContainerBuilder<'a, 'b, A> { let start = _fbb.start_table(); ContractContainerBuilder { @@ -1337,16 +1355,16 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, ContractContainer::VT_CONTRACT, "contract"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ContractContainer<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ContractContainer<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ContractContainer"); ds.field("contract_type", &self.contract_type()); match self.contract_type() { @@ -1372,24 +1390,24 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct StateUpdate<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for StateUpdate<'a> { + impl<'a> flatbuffers::Follow<'a> for StateUpdate<'a> { type Inner = StateUpdate<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> StateUpdate<'a> { - pub const VT_STATE: ::flatbuffers::VOffsetT = 4; + pub const VT_STATE: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { StateUpdate { _tab: table } } #[allow(unused_mut)] @@ -1397,11 +1415,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args StateUpdateArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = StateUpdateBuilder::new(_fbb); if let Some(x) = args.state { builder.add_state(x); @@ -1410,13 +1428,13 @@ pub mod common { } #[inline] - pub fn state(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn state(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( StateUpdate::VT_STATE, None, ) @@ -1425,14 +1443,15 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for StateUpdate<'_> { + impl flatbuffers::Verifiable for StateUpdate<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "state", Self::VT_STATE, true, @@ -1442,7 +1461,7 @@ pub mod common { } } pub struct StateUpdateArgs<'a> { - pub state: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub state: Option>>, } impl<'a> Default for StateUpdateArgs<'a> { #[inline] @@ -1453,22 +1472,19 @@ pub mod common { } } - pub struct StateUpdateBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct StateUpdateBuilder<'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> StateUpdateBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StateUpdateBuilder<'a, 'b, A> { #[inline] - pub fn add_state( - &mut self, - state: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { + pub fn add_state(&mut self, state: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(StateUpdate::VT_STATE, state); + .push_slot_always::>(StateUpdate::VT_STATE, state); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> StateUpdateBuilder<'a, 'b, A> { let start = _fbb.start_table(); StateUpdateBuilder { @@ -1477,15 +1493,15 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, StateUpdate::VT_STATE, "state"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for StateUpdate<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for StateUpdate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("StateUpdate"); ds.field("state", &self.state()); ds.finish() @@ -1495,24 +1511,24 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct DeltaUpdate<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for DeltaUpdate<'a> { + impl<'a> flatbuffers::Follow<'a> for DeltaUpdate<'a> { type Inner = DeltaUpdate<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> DeltaUpdate<'a> { - pub const VT_DELTA: ::flatbuffers::VOffsetT = 4; + pub const VT_DELTA: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { DeltaUpdate { _tab: table } } #[allow(unused_mut)] @@ -1520,11 +1536,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args DeltaUpdateArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = DeltaUpdateBuilder::new(_fbb); if let Some(x) = args.delta { builder.add_delta(x); @@ -1533,13 +1549,13 @@ pub mod common { } #[inline] - pub fn delta(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn delta(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( DeltaUpdate::VT_DELTA, None, ) @@ -1548,14 +1564,15 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for DeltaUpdate<'_> { + impl flatbuffers::Verifiable for DeltaUpdate<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "delta", Self::VT_DELTA, true, @@ -1565,7 +1582,7 @@ pub mod common { } } pub struct DeltaUpdateArgs<'a> { - pub delta: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub delta: Option>>, } impl<'a> Default for DeltaUpdateArgs<'a> { #[inline] @@ -1576,22 +1593,19 @@ pub mod common { } } - pub struct DeltaUpdateBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct DeltaUpdateBuilder<'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> DeltaUpdateBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DeltaUpdateBuilder<'a, 'b, A> { #[inline] - pub fn add_delta( - &mut self, - delta: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { + pub fn add_delta(&mut self, delta: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(DeltaUpdate::VT_DELTA, delta); + .push_slot_always::>(DeltaUpdate::VT_DELTA, delta); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> DeltaUpdateBuilder<'a, 'b, A> { let start = _fbb.start_table(); DeltaUpdateBuilder { @@ -1600,15 +1614,15 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, DeltaUpdate::VT_DELTA, "delta"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for DeltaUpdate<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for DeltaUpdate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DeltaUpdate"); ds.field("delta", &self.delta()); ds.finish() @@ -1618,25 +1632,25 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct StateAndDeltaUpdate<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for StateAndDeltaUpdate<'a> { + impl<'a> flatbuffers::Follow<'a> for StateAndDeltaUpdate<'a> { type Inner = StateAndDeltaUpdate<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> StateAndDeltaUpdate<'a> { - pub const VT_STATE: ::flatbuffers::VOffsetT = 4; - pub const VT_DELTA: ::flatbuffers::VOffsetT = 6; + pub const VT_STATE: flatbuffers::VOffsetT = 4; + pub const VT_DELTA: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { StateAndDeltaUpdate { _tab: table } } #[allow(unused_mut)] @@ -1644,11 +1658,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args StateAndDeltaUpdateArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = StateAndDeltaUpdateBuilder::new(_fbb); if let Some(x) = args.delta { builder.add_delta(x); @@ -1660,13 +1674,13 @@ pub mod common { } #[inline] - pub fn state(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn state(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( StateAndDeltaUpdate::VT_STATE, None, ) @@ -1674,13 +1688,13 @@ pub mod common { } } #[inline] - pub fn delta(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn delta(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( StateAndDeltaUpdate::VT_DELTA, None, ) @@ -1689,19 +1703,20 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for StateAndDeltaUpdate<'_> { + impl flatbuffers::Verifiable for StateAndDeltaUpdate<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "state", Self::VT_STATE, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "delta", Self::VT_DELTA, true, @@ -1711,8 +1726,8 @@ pub mod common { } } pub struct StateAndDeltaUpdateArgs<'a> { - pub state: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub delta: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub state: Option>>, + pub delta: Option>>, } impl<'a> Default for StateAndDeltaUpdateArgs<'a> { #[inline] @@ -1724,34 +1739,28 @@ pub mod common { } } - pub struct StateAndDeltaUpdateBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct StateAndDeltaUpdateBuilder<'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> StateAndDeltaUpdateBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StateAndDeltaUpdateBuilder<'a, 'b, A> { #[inline] - pub fn add_state( - &mut self, - state: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + pub fn add_state(&mut self, state: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( StateAndDeltaUpdate::VT_STATE, state, ); } #[inline] - pub fn add_delta( - &mut self, - delta: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + pub fn add_delta(&mut self, delta: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( StateAndDeltaUpdate::VT_DELTA, delta, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> StateAndDeltaUpdateBuilder<'a, 'b, A> { let start = _fbb.start_table(); StateAndDeltaUpdateBuilder { @@ -1760,18 +1769,18 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, StateAndDeltaUpdate::VT_STATE, "state"); self.fbb_ .required(o, StateAndDeltaUpdate::VT_DELTA, "delta"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for StateAndDeltaUpdate<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for StateAndDeltaUpdate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("StateAndDeltaUpdate"); ds.field("state", &self.state()); ds.field("delta", &self.delta()); @@ -1782,25 +1791,25 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct RelatedStateUpdate<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for RelatedStateUpdate<'a> { + impl<'a> flatbuffers::Follow<'a> for RelatedStateUpdate<'a> { type Inner = RelatedStateUpdate<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> RelatedStateUpdate<'a> { - pub const VT_RELATED_TO: ::flatbuffers::VOffsetT = 4; - pub const VT_STATE: ::flatbuffers::VOffsetT = 6; + pub const VT_RELATED_TO: flatbuffers::VOffsetT = 4; + pub const VT_STATE: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { RelatedStateUpdate { _tab: table } } #[allow(unused_mut)] @@ -1808,11 +1817,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RelatedStateUpdateArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = RelatedStateUpdateBuilder::new(_fbb); if let Some(x) = args.state { builder.add_state(x); @@ -1830,7 +1839,7 @@ pub mod common { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( RelatedStateUpdate::VT_RELATED_TO, None, ) @@ -1838,13 +1847,13 @@ pub mod common { } } #[inline] - pub fn state(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn state(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( RelatedStateUpdate::VT_STATE, None, ) @@ -1853,19 +1862,20 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for RelatedStateUpdate<'_> { + impl flatbuffers::Verifiable for RelatedStateUpdate<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "related_to", Self::VT_RELATED_TO, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "state", Self::VT_STATE, true, @@ -1875,8 +1885,8 @@ pub mod common { } } pub struct RelatedStateUpdateArgs<'a> { - pub related_to: Option<::flatbuffers::WIPOffset>>, - pub state: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub related_to: Option>>, + pub state: Option>>, } impl<'a> Default for RelatedStateUpdateArgs<'a> { #[inline] @@ -1888,35 +1898,30 @@ pub mod common { } } - pub struct RelatedStateUpdateBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct RelatedStateUpdateBuilder<'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> RelatedStateUpdateBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RelatedStateUpdateBuilder<'a, 'b, A> { #[inline] pub fn add_related_to( &mut self, - related_to: ::flatbuffers::WIPOffset>, + related_to: flatbuffers::WIPOffset>, ) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( RelatedStateUpdate::VT_RELATED_TO, related_to, ); } #[inline] - pub fn add_state( - &mut self, - state: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( - RelatedStateUpdate::VT_STATE, - state, - ); + pub fn add_state(&mut self, state: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(RelatedStateUpdate::VT_STATE, state); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> RelatedStateUpdateBuilder<'a, 'b, A> { let start = _fbb.start_table(); RelatedStateUpdateBuilder { @@ -1925,17 +1930,17 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, RelatedStateUpdate::VT_RELATED_TO, "related_to"); self.fbb_.required(o, RelatedStateUpdate::VT_STATE, "state"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for RelatedStateUpdate<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for RelatedStateUpdate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("RelatedStateUpdate"); ds.field("related_to", &self.related_to()); ds.field("state", &self.state()); @@ -1946,25 +1951,25 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct RelatedDeltaUpdate<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for RelatedDeltaUpdate<'a> { + impl<'a> flatbuffers::Follow<'a> for RelatedDeltaUpdate<'a> { type Inner = RelatedDeltaUpdate<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> RelatedDeltaUpdate<'a> { - pub const VT_RELATED_TO: ::flatbuffers::VOffsetT = 4; - pub const VT_DELTA: ::flatbuffers::VOffsetT = 6; + pub const VT_RELATED_TO: flatbuffers::VOffsetT = 4; + pub const VT_DELTA: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { RelatedDeltaUpdate { _tab: table } } #[allow(unused_mut)] @@ -1972,11 +1977,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RelatedDeltaUpdateArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = RelatedDeltaUpdateBuilder::new(_fbb); if let Some(x) = args.delta { builder.add_delta(x); @@ -1994,7 +1999,7 @@ pub mod common { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( RelatedDeltaUpdate::VT_RELATED_TO, None, ) @@ -2002,13 +2007,13 @@ pub mod common { } } #[inline] - pub fn delta(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn delta(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( RelatedDeltaUpdate::VT_DELTA, None, ) @@ -2017,19 +2022,20 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for RelatedDeltaUpdate<'_> { + impl flatbuffers::Verifiable for RelatedDeltaUpdate<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "related_to", Self::VT_RELATED_TO, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "delta", Self::VT_DELTA, true, @@ -2039,8 +2045,8 @@ pub mod common { } } pub struct RelatedDeltaUpdateArgs<'a> { - pub related_to: Option<::flatbuffers::WIPOffset>>, - pub delta: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub related_to: Option>>, + pub delta: Option>>, } impl<'a> Default for RelatedDeltaUpdateArgs<'a> { #[inline] @@ -2052,35 +2058,30 @@ pub mod common { } } - pub struct RelatedDeltaUpdateBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct RelatedDeltaUpdateBuilder<'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> RelatedDeltaUpdateBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RelatedDeltaUpdateBuilder<'a, 'b, A> { #[inline] pub fn add_related_to( &mut self, - related_to: ::flatbuffers::WIPOffset>, + related_to: flatbuffers::WIPOffset>, ) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( RelatedDeltaUpdate::VT_RELATED_TO, related_to, ); } #[inline] - pub fn add_delta( - &mut self, - delta: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( - RelatedDeltaUpdate::VT_DELTA, - delta, - ); + pub fn add_delta(&mut self, delta: flatbuffers::WIPOffset>) { + self.fbb_ + .push_slot_always::>(RelatedDeltaUpdate::VT_DELTA, delta); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> RelatedDeltaUpdateBuilder<'a, 'b, A> { let start = _fbb.start_table(); RelatedDeltaUpdateBuilder { @@ -2089,17 +2090,17 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, RelatedDeltaUpdate::VT_RELATED_TO, "related_to"); self.fbb_.required(o, RelatedDeltaUpdate::VT_DELTA, "delta"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for RelatedDeltaUpdate<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for RelatedDeltaUpdate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("RelatedDeltaUpdate"); ds.field("related_to", &self.related_to()); ds.field("delta", &self.delta()); @@ -2110,26 +2111,26 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct RelatedStateAndDeltaUpdate<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for RelatedStateAndDeltaUpdate<'a> { + impl<'a> flatbuffers::Follow<'a> for RelatedStateAndDeltaUpdate<'a> { type Inner = RelatedStateAndDeltaUpdate<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> RelatedStateAndDeltaUpdate<'a> { - pub const VT_RELATED_TO: ::flatbuffers::VOffsetT = 4; - pub const VT_STATE: ::flatbuffers::VOffsetT = 6; - pub const VT_DELTA: ::flatbuffers::VOffsetT = 8; + pub const VT_RELATED_TO: flatbuffers::VOffsetT = 4; + pub const VT_STATE: flatbuffers::VOffsetT = 6; + pub const VT_DELTA: flatbuffers::VOffsetT = 8; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { RelatedStateAndDeltaUpdate { _tab: table } } #[allow(unused_mut)] @@ -2137,11 +2138,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RelatedStateAndDeltaUpdateArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = RelatedStateAndDeltaUpdateBuilder::new(_fbb); if let Some(x) = args.delta { builder.add_delta(x); @@ -2162,7 +2163,7 @@ pub mod common { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( RelatedStateAndDeltaUpdate::VT_RELATED_TO, None, ) @@ -2170,13 +2171,13 @@ pub mod common { } } #[inline] - pub fn state(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn state(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( RelatedStateAndDeltaUpdate::VT_STATE, None, ) @@ -2184,13 +2185,13 @@ pub mod common { } } #[inline] - pub fn delta(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn delta(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( RelatedStateAndDeltaUpdate::VT_DELTA, None, ) @@ -2199,24 +2200,25 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for RelatedStateAndDeltaUpdate<'_> { + impl flatbuffers::Verifiable for RelatedStateAndDeltaUpdate<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "related_to", Self::VT_RELATED_TO, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "state", Self::VT_STATE, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "delta", Self::VT_DELTA, true, @@ -2226,9 +2228,9 @@ pub mod common { } } pub struct RelatedStateAndDeltaUpdateArgs<'a> { - pub related_to: Option<::flatbuffers::WIPOffset>>, - pub state: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub delta: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub related_to: Option>>, + pub state: Option>>, + pub delta: Option>>, } impl<'a> Default for RelatedStateAndDeltaUpdateArgs<'a> { #[inline] @@ -2241,45 +2243,39 @@ pub mod common { } } - pub struct RelatedStateAndDeltaUpdateBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct RelatedStateAndDeltaUpdateBuilder<'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> RelatedStateAndDeltaUpdateBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RelatedStateAndDeltaUpdateBuilder<'a, 'b, A> { #[inline] pub fn add_related_to( &mut self, - related_to: ::flatbuffers::WIPOffset>, + related_to: flatbuffers::WIPOffset>, ) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( RelatedStateAndDeltaUpdate::VT_RELATED_TO, related_to, ); } #[inline] - pub fn add_state( - &mut self, - state: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + pub fn add_state(&mut self, state: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( RelatedStateAndDeltaUpdate::VT_STATE, state, ); } #[inline] - pub fn add_delta( - &mut self, - delta: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + pub fn add_delta(&mut self, delta: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>( RelatedStateAndDeltaUpdate::VT_DELTA, delta, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> RelatedStateAndDeltaUpdateBuilder<'a, 'b, A> { let start = _fbb.start_table(); RelatedStateAndDeltaUpdateBuilder { @@ -2288,7 +2284,7 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, RelatedStateAndDeltaUpdate::VT_RELATED_TO, "related_to"); @@ -2296,12 +2292,12 @@ pub mod common { .required(o, RelatedStateAndDeltaUpdate::VT_STATE, "state"); self.fbb_ .required(o, RelatedStateAndDeltaUpdate::VT_DELTA, "delta"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for RelatedStateAndDeltaUpdate<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for RelatedStateAndDeltaUpdate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("RelatedStateAndDeltaUpdate"); ds.field("related_to", &self.related_to()); ds.field("state", &self.state()); @@ -2313,25 +2309,25 @@ pub mod common { #[derive(Copy, Clone, PartialEq)] pub struct UpdateData<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for UpdateData<'a> { + impl<'a> flatbuffers::Follow<'a> for UpdateData<'a> { type Inner = UpdateData<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> UpdateData<'a> { - pub const VT_UPDATE_DATA_TYPE: ::flatbuffers::VOffsetT = 4; - pub const VT_UPDATE_DATA: ::flatbuffers::VOffsetT = 6; + pub const VT_UPDATE_DATA_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_UPDATE_DATA: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { UpdateData { _tab: table } } #[allow(unused_mut)] @@ -2339,11 +2335,11 @@ pub mod common { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args UpdateDataArgs, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = UpdateDataBuilder::new(_fbb); if let Some(x) = args.update_data { builder.add_update_data(x); @@ -2367,13 +2363,13 @@ pub mod common { } } #[inline] - pub fn update_data(&self) -> ::flatbuffers::Table<'a> { + pub fn update_data(&self) -> flatbuffers::Table<'a> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>( + .get::>>( UpdateData::VT_UPDATE_DATA, None, ) @@ -2467,21 +2463,22 @@ pub mod common { } } - impl ::flatbuffers::Verifiable for UpdateData<'_> { + impl flatbuffers::Verifiable for UpdateData<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_union::("update_data_type", Self::VT_UPDATE_DATA_TYPE, "update_data", Self::VT_UPDATE_DATA, true, |key, v, pos| { match key { - UpdateDataType::StateUpdate => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("UpdateDataType::StateUpdate", pos), - UpdateDataType::DeltaUpdate => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("UpdateDataType::DeltaUpdate", pos), - UpdateDataType::StateAndDeltaUpdate => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("UpdateDataType::StateAndDeltaUpdate", pos), - UpdateDataType::RelatedStateUpdate => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("UpdateDataType::RelatedStateUpdate", pos), - UpdateDataType::RelatedDeltaUpdate => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("UpdateDataType::RelatedDeltaUpdate", pos), - UpdateDataType::RelatedStateAndDeltaUpdate => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("UpdateDataType::RelatedStateAndDeltaUpdate", pos), + UpdateDataType::StateUpdate => v.verify_union_variant::>("UpdateDataType::StateUpdate", pos), + UpdateDataType::DeltaUpdate => v.verify_union_variant::>("UpdateDataType::DeltaUpdate", pos), + UpdateDataType::StateAndDeltaUpdate => v.verify_union_variant::>("UpdateDataType::StateAndDeltaUpdate", pos), + UpdateDataType::RelatedStateUpdate => v.verify_union_variant::>("UpdateDataType::RelatedStateUpdate", pos), + UpdateDataType::RelatedDeltaUpdate => v.verify_union_variant::>("UpdateDataType::RelatedDeltaUpdate", pos), + UpdateDataType::RelatedStateAndDeltaUpdate => v.verify_union_variant::>("UpdateDataType::RelatedStateAndDeltaUpdate", pos), _ => Ok(()), } })? @@ -2491,7 +2488,7 @@ pub mod common { } pub struct UpdateDataArgs { pub update_data_type: UpdateDataType, - pub update_data: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>, + pub update_data: Option>, } impl<'a> Default for UpdateDataArgs { #[inline] @@ -2503,11 +2500,11 @@ pub mod common { } } - pub struct UpdateDataBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct UpdateDataBuilder<'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> UpdateDataBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UpdateDataBuilder<'a, 'b, A> { #[inline] pub fn add_update_data_type(&mut self, update_data_type: UpdateDataType) { self.fbb_.push_slot::( @@ -2519,16 +2516,16 @@ pub mod common { #[inline] pub fn add_update_data( &mut self, - update_data: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>, + update_data: flatbuffers::WIPOffset, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( UpdateData::VT_UPDATE_DATA, update_data, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> UpdateDataBuilder<'a, 'b, A> { let start = _fbb.start_table(); UpdateDataBuilder { @@ -2537,16 +2534,16 @@ pub mod common { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, UpdateData::VT_UPDATE_DATA, "update_data"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for UpdateData<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for UpdateData<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("UpdateData"); ds.field("update_data_type", &self.update_data_type()); match self.update_data_type() { diff --git a/rust/src/generated/host_response_generated.rs b/rust/src/generated/host_response_generated.rs index 3535a51..58b69c6 100644 --- a/rust/src/generated/host_response_generated.rs +++ b/rust/src/generated/host_response_generated.rs @@ -1,13 +1,23 @@ // automatically generated by the FlatBuffers compiler, do not modify + // @generated -extern crate alloc; use crate::common_generated::*; +use core::cmp::Ordering; +use core::mem; + +extern crate flatbuffers; +use self::flatbuffers::{EndianScalar, Follow}; #[allow(unused_imports, dead_code)] pub mod host_response { use crate::common_generated::*; + use core::cmp::Ordering; + use core::mem; + + extern crate flatbuffers; + use self::flatbuffers::{EndianScalar, Follow}; #[deprecated( since = "2.0.0", @@ -72,8 +82,8 @@ pub mod host_response { } } } - impl ::core::fmt::Debug for ContractResponseType { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { + impl core::fmt::Debug for ContractResponseType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { @@ -81,24 +91,24 @@ pub mod host_response { } } } - impl<'a> ::flatbuffers::Follow<'a> for ContractResponseType { + impl<'a> flatbuffers::Follow<'a> for ContractResponseType { type Inner = Self; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { ::flatbuffers::read_scalar_at::(buf, loc) }; + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } - impl ::flatbuffers::Push for ContractResponseType { + impl flatbuffers::Push for ContractResponseType { type Output = ContractResponseType; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - unsafe { ::flatbuffers::emplace_scalar::(dst, self.0) }; + flatbuffers::emplace_scalar::(dst, self.0); } } - impl ::flatbuffers::EndianScalar for ContractResponseType { + impl flatbuffers::EndianScalar for ContractResponseType { type Scalar = u8; #[inline] fn to_little_endian(self) -> u8 { @@ -112,17 +122,18 @@ pub mod host_response { } } - impl<'a> ::flatbuffers::Verifiable for ContractResponseType { + impl<'a> flatbuffers::Verifiable for ContractResponseType { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; u8::run_verifier(v, pos) } } - impl ::flatbuffers::SimpleToVerifyInSlice for ContractResponseType {} + impl flatbuffers::SimpleToVerifyInSlice for ContractResponseType {} pub struct ContractResponseTypeUnionTableOffset {} #[deprecated( @@ -176,8 +187,8 @@ pub mod host_response { } } } - impl ::core::fmt::Debug for OutboundDelegateMsgType { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { + impl core::fmt::Debug for OutboundDelegateMsgType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { @@ -185,24 +196,24 @@ pub mod host_response { } } } - impl<'a> ::flatbuffers::Follow<'a> for OutboundDelegateMsgType { + impl<'a> flatbuffers::Follow<'a> for OutboundDelegateMsgType { type Inner = Self; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { ::flatbuffers::read_scalar_at::(buf, loc) }; + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } - impl ::flatbuffers::Push for OutboundDelegateMsgType { + impl flatbuffers::Push for OutboundDelegateMsgType { type Output = OutboundDelegateMsgType; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - unsafe { ::flatbuffers::emplace_scalar::(dst, self.0) }; + flatbuffers::emplace_scalar::(dst, self.0); } } - impl ::flatbuffers::EndianScalar for OutboundDelegateMsgType { + impl flatbuffers::EndianScalar for OutboundDelegateMsgType { type Scalar = u8; #[inline] fn to_little_endian(self) -> u8 { @@ -216,17 +227,18 @@ pub mod host_response { } } - impl<'a> ::flatbuffers::Verifiable for OutboundDelegateMsgType { + impl<'a> flatbuffers::Verifiable for OutboundDelegateMsgType { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; u8::run_verifier(v, pos) } } - impl ::flatbuffers::SimpleToVerifyInSlice for OutboundDelegateMsgType {} + impl flatbuffers::SimpleToVerifyInSlice for OutboundDelegateMsgType {} pub struct OutboundDelegateMsgTypeUnionTableOffset {} #[deprecated( @@ -292,8 +304,8 @@ pub mod host_response { } } } - impl ::core::fmt::Debug for HostResponseType { - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { + impl core::fmt::Debug for HostResponseType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { @@ -301,24 +313,24 @@ pub mod host_response { } } } - impl<'a> ::flatbuffers::Follow<'a> for HostResponseType { + impl<'a> flatbuffers::Follow<'a> for HostResponseType { type Inner = Self; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { ::flatbuffers::read_scalar_at::(buf, loc) }; + let b = flatbuffers::read_scalar_at::(buf, loc); Self(b) } } - impl ::flatbuffers::Push for HostResponseType { + impl flatbuffers::Push for HostResponseType { type Output = HostResponseType; #[inline] unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - unsafe { ::flatbuffers::emplace_scalar::(dst, self.0) }; + flatbuffers::emplace_scalar::(dst, self.0); } } - impl ::flatbuffers::EndianScalar for HostResponseType { + impl flatbuffers::EndianScalar for HostResponseType { type Scalar = u8; #[inline] fn to_little_endian(self) -> u8 { @@ -332,43 +344,44 @@ pub mod host_response { } } - impl<'a> ::flatbuffers::Verifiable for HostResponseType { + impl<'a> flatbuffers::Verifiable for HostResponseType { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; u8::run_verifier(v, pos) } } - impl ::flatbuffers::SimpleToVerifyInSlice for HostResponseType {} + impl flatbuffers::SimpleToVerifyInSlice for HostResponseType {} pub struct HostResponseTypeUnionTableOffset {} pub enum GetResponseOffset {} #[derive(Copy, Clone, PartialEq)] pub struct GetResponse<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for GetResponse<'a> { + impl<'a> flatbuffers::Follow<'a> for GetResponse<'a> { type Inner = GetResponse<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> GetResponse<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_CONTRACT: ::flatbuffers::VOffsetT = 6; - pub const VT_STATE: ::flatbuffers::VOffsetT = 8; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_CONTRACT: flatbuffers::VOffsetT = 6; + pub const VT_STATE: flatbuffers::VOffsetT = 8; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { GetResponse { _tab: table } } #[allow(unused_mut)] @@ -376,11 +389,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GetResponseArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = GetResponseBuilder::new(_fbb); if let Some(x) = args.state { builder.add_state(x); @@ -401,7 +414,7 @@ pub mod host_response { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( GetResponse::VT_KEY, None, ) @@ -415,20 +428,20 @@ pub mod host_response { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( GetResponse::VT_CONTRACT, None, ) } } #[inline] - pub fn state(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn state(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( GetResponse::VT_STATE, None, ) @@ -437,24 +450,25 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for GetResponse<'_> { + impl flatbuffers::Verifiable for GetResponse<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "contract", Self::VT_CONTRACT, false, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "state", Self::VT_STATE, true, @@ -464,9 +478,9 @@ pub mod host_response { } } pub struct GetResponseArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset>>, - pub contract: Option<::flatbuffers::WIPOffset>>, - pub state: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub key: Option>>, + pub contract: Option>>, + pub state: Option>>, } impl<'a> Default for GetResponseArgs<'a> { #[inline] @@ -479,15 +493,15 @@ pub mod host_response { } } - pub struct GetResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct GetResponseBuilder<'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> GetResponseBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetResponseBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( GetResponse::VT_KEY, key, ); @@ -495,25 +509,22 @@ pub mod host_response { #[inline] pub fn add_contract( &mut self, - contract: ::flatbuffers::WIPOffset>, + contract: flatbuffers::WIPOffset>, ) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( GetResponse::VT_CONTRACT, contract, ); } #[inline] - pub fn add_state( - &mut self, - state: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, - ) { + pub fn add_state(&mut self, state: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(GetResponse::VT_STATE, state); + .push_slot_always::>(GetResponse::VT_STATE, state); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> GetResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); GetResponseBuilder { @@ -522,16 +533,16 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, GetResponse::VT_KEY, "key"); self.fbb_.required(o, GetResponse::VT_STATE, "state"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for GetResponse<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for GetResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("GetResponse"); ds.field("key", &self.key()); ds.field("contract", &self.contract()); @@ -543,24 +554,24 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct PutResponse<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for PutResponse<'a> { + impl<'a> flatbuffers::Follow<'a> for PutResponse<'a> { type Inner = PutResponse<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> PutResponse<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; + pub const VT_KEY: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { PutResponse { _tab: table } } #[allow(unused_mut)] @@ -568,11 +579,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args PutResponseArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = PutResponseBuilder::new(_fbb); if let Some(x) = args.key { builder.add_key(x); @@ -587,7 +598,7 @@ pub mod host_response { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( PutResponse::VT_KEY, None, ) @@ -596,14 +607,15 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for PutResponse<'_> { + impl flatbuffers::Verifiable for PutResponse<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, @@ -613,7 +625,7 @@ pub mod host_response { } } pub struct PutResponseArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset>>, + pub key: Option>>, } impl<'a> Default for PutResponseArgs<'a> { #[inline] @@ -624,22 +636,22 @@ pub mod host_response { } } - pub struct PutResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct PutResponseBuilder<'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> PutResponseBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PutResponseBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( PutResponse::VT_KEY, key, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> PutResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); PutResponseBuilder { @@ -648,15 +660,15 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, PutResponse::VT_KEY, "key"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for PutResponse<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for PutResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("PutResponse"); ds.field("key", &self.key()); ds.finish() @@ -666,25 +678,25 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct UpdateNotification<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for UpdateNotification<'a> { + impl<'a> flatbuffers::Follow<'a> for UpdateNotification<'a> { type Inner = UpdateNotification<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> UpdateNotification<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_UPDATE: ::flatbuffers::VOffsetT = 6; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_UPDATE: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { UpdateNotification { _tab: table } } #[allow(unused_mut)] @@ -692,11 +704,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args UpdateNotificationArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = UpdateNotificationBuilder::new(_fbb); if let Some(x) = args.update { builder.add_update(x); @@ -714,7 +726,7 @@ pub mod host_response { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( UpdateNotification::VT_KEY, None, ) @@ -728,7 +740,7 @@ pub mod host_response { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( UpdateNotification::VT_UPDATE, None, ) @@ -737,19 +749,20 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for UpdateNotification<'_> { + impl flatbuffers::Verifiable for UpdateNotification<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "update", Self::VT_UPDATE, true, @@ -759,8 +772,8 @@ pub mod host_response { } } pub struct UpdateNotificationArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset>>, - pub update: Option<::flatbuffers::WIPOffset>>, + pub key: Option>>, + pub update: Option>>, } impl<'a> Default for UpdateNotificationArgs<'a> { #[inline] @@ -772,15 +785,15 @@ pub mod host_response { } } - pub struct UpdateNotificationBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct UpdateNotificationBuilder<'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> UpdateNotificationBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UpdateNotificationBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( UpdateNotification::VT_KEY, key, ); @@ -788,17 +801,17 @@ pub mod host_response { #[inline] pub fn add_update( &mut self, - update: ::flatbuffers::WIPOffset>, + update: flatbuffers::WIPOffset>, ) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( UpdateNotification::VT_UPDATE, update, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> UpdateNotificationBuilder<'a, 'b, A> { let start = _fbb.start_table(); UpdateNotificationBuilder { @@ -807,17 +820,17 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, UpdateNotification::VT_KEY, "key"); self.fbb_ .required(o, UpdateNotification::VT_UPDATE, "update"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for UpdateNotification<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for UpdateNotification<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("UpdateNotification"); ds.field("key", &self.key()); ds.field("update", &self.update()); @@ -828,25 +841,25 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct UpdateResponse<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for UpdateResponse<'a> { + impl<'a> flatbuffers::Follow<'a> for UpdateResponse<'a> { type Inner = UpdateResponse<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> UpdateResponse<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_SUMMARY: ::flatbuffers::VOffsetT = 6; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_SUMMARY: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { UpdateResponse { _tab: table } } #[allow(unused_mut)] @@ -854,11 +867,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args UpdateResponseArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = UpdateResponseBuilder::new(_fbb); if let Some(x) = args.summary { builder.add_summary(x); @@ -876,7 +889,7 @@ pub mod host_response { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( UpdateResponse::VT_KEY, None, ) @@ -884,13 +897,13 @@ pub mod host_response { } } #[inline] - pub fn summary(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn summary(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( UpdateResponse::VT_SUMMARY, None, ) @@ -899,19 +912,20 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for UpdateResponse<'_> { + impl flatbuffers::Verifiable for UpdateResponse<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "summary", Self::VT_SUMMARY, true, @@ -921,8 +935,8 @@ pub mod host_response { } } pub struct UpdateResponseArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset>>, - pub summary: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub key: Option>>, + pub summary: Option>>, } impl<'a> Default for UpdateResponseArgs<'a> { #[inline] @@ -934,15 +948,15 @@ pub mod host_response { } } - pub struct UpdateResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct UpdateResponseBuilder<'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> UpdateResponseBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UpdateResponseBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( UpdateResponse::VT_KEY, key, ); @@ -950,16 +964,14 @@ pub mod host_response { #[inline] pub fn add_summary( &mut self, - summary: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + summary: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( - UpdateResponse::VT_SUMMARY, - summary, - ); + self.fbb_ + .push_slot_always::>(UpdateResponse::VT_SUMMARY, summary); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> UpdateResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); UpdateResponseBuilder { @@ -968,16 +980,16 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, UpdateResponse::VT_KEY, "key"); self.fbb_.required(o, UpdateResponse::VT_SUMMARY, "summary"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for UpdateResponse<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for UpdateResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("UpdateResponse"); ds.field("key", &self.key()); ds.field("summary", &self.summary()); @@ -988,24 +1000,24 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct NotFound<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for NotFound<'a> { + impl<'a> flatbuffers::Follow<'a> for NotFound<'a> { type Inner = NotFound<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> NotFound<'a> { - pub const VT_INSTANCE_ID: ::flatbuffers::VOffsetT = 4; + pub const VT_INSTANCE_ID: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { NotFound { _tab: table } } #[allow(unused_mut)] @@ -1013,11 +1025,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args NotFoundArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = NotFoundBuilder::new(_fbb); if let Some(x) = args.instance_id { builder.add_instance_id(x); @@ -1032,7 +1044,7 @@ pub mod host_response { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( NotFound::VT_INSTANCE_ID, None, ) @@ -1041,14 +1053,15 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for NotFound<'_> { + impl flatbuffers::Verifiable for NotFound<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "instance_id", Self::VT_INSTANCE_ID, true, @@ -1058,7 +1071,7 @@ pub mod host_response { } } pub struct NotFoundArgs<'a> { - pub instance_id: Option<::flatbuffers::WIPOffset>>, + pub instance_id: Option>>, } impl<'a> Default for NotFoundArgs<'a> { #[inline] @@ -1069,25 +1082,25 @@ pub mod host_response { } } - pub struct NotFoundBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct NotFoundBuilder<'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> NotFoundBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> NotFoundBuilder<'a, 'b, A> { #[inline] pub fn add_instance_id( &mut self, - instance_id: ::flatbuffers::WIPOffset>, + instance_id: flatbuffers::WIPOffset>, ) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( NotFound::VT_INSTANCE_ID, instance_id, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> NotFoundBuilder<'a, 'b, A> { let start = _fbb.start_table(); NotFoundBuilder { @@ -1096,16 +1109,16 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, NotFound::VT_INSTANCE_ID, "instance_id"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for NotFound<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for NotFound<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("NotFound"); ds.field("instance_id", &self.instance_id()); ds.finish() @@ -1115,25 +1128,25 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct SubscribeResponse<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for SubscribeResponse<'a> { + impl<'a> flatbuffers::Follow<'a> for SubscribeResponse<'a> { type Inner = SubscribeResponse<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> SubscribeResponse<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_SUBSCRIBED: ::flatbuffers::VOffsetT = 6; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_SUBSCRIBED: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { SubscribeResponse { _tab: table } } #[allow(unused_mut)] @@ -1141,11 +1154,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args SubscribeResponseArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = SubscribeResponseBuilder::new(_fbb); if let Some(x) = args.key { builder.add_key(x); @@ -1161,7 +1174,7 @@ pub mod host_response { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( SubscribeResponse::VT_KEY, None, ) @@ -1181,14 +1194,15 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for SubscribeResponse<'_> { + impl flatbuffers::Verifiable for SubscribeResponse<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, @@ -1199,7 +1213,7 @@ pub mod host_response { } } pub struct SubscribeResponseArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset>>, + pub key: Option>>, pub subscribed: bool, } impl<'a> Default for SubscribeResponseArgs<'a> { @@ -1212,15 +1226,15 @@ pub mod host_response { } } - pub struct SubscribeResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct SubscribeResponseBuilder<'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> SubscribeResponseBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SubscribeResponseBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( SubscribeResponse::VT_KEY, key, ); @@ -1232,7 +1246,7 @@ pub mod host_response { } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> SubscribeResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); SubscribeResponseBuilder { @@ -1241,15 +1255,15 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, SubscribeResponse::VT_KEY, "key"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for SubscribeResponse<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for SubscribeResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SubscribeResponse"); ds.field("key", &self.key()); ds.field("subscribed", &self.subscribed()); @@ -1260,25 +1274,25 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct ContractResponse<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ContractResponse<'a> { + impl<'a> flatbuffers::Follow<'a> for ContractResponse<'a> { type Inner = ContractResponse<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ContractResponse<'a> { - pub const VT_CONTRACT_RESPONSE_TYPE: ::flatbuffers::VOffsetT = 4; - pub const VT_CONTRACT_RESPONSE: ::flatbuffers::VOffsetT = 6; + pub const VT_CONTRACT_RESPONSE_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_CONTRACT_RESPONSE: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ContractResponse { _tab: table } } #[allow(unused_mut)] @@ -1286,11 +1300,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ContractResponseArgs, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ContractResponseBuilder::new(_fbb); if let Some(x) = args.contract_response { builder.add_contract_response(x); @@ -1314,13 +1328,13 @@ pub mod host_response { } } #[inline] - pub fn contract_response(&self) -> ::flatbuffers::Table<'a> { + pub fn contract_response(&self) -> flatbuffers::Table<'a> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>( + .get::>>( ContractResponse::VT_CONTRACT_RESPONSE, None, ) @@ -1412,21 +1426,22 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for ContractResponse<'_> { + impl flatbuffers::Verifiable for ContractResponse<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_union::("contract_response_type", Self::VT_CONTRACT_RESPONSE_TYPE, "contract_response", Self::VT_CONTRACT_RESPONSE, true, |key, v, pos| { match key { - ContractResponseType::GetResponse => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("ContractResponseType::GetResponse", pos), - ContractResponseType::PutResponse => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("ContractResponseType::PutResponse", pos), - ContractResponseType::UpdateNotification => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("ContractResponseType::UpdateNotification", pos), - ContractResponseType::UpdateResponse => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("ContractResponseType::UpdateResponse", pos), - ContractResponseType::NotFound => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("ContractResponseType::NotFound", pos), - ContractResponseType::SubscribeResponse => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("ContractResponseType::SubscribeResponse", pos), + ContractResponseType::GetResponse => v.verify_union_variant::>("ContractResponseType::GetResponse", pos), + ContractResponseType::PutResponse => v.verify_union_variant::>("ContractResponseType::PutResponse", pos), + ContractResponseType::UpdateNotification => v.verify_union_variant::>("ContractResponseType::UpdateNotification", pos), + ContractResponseType::UpdateResponse => v.verify_union_variant::>("ContractResponseType::UpdateResponse", pos), + ContractResponseType::NotFound => v.verify_union_variant::>("ContractResponseType::NotFound", pos), + ContractResponseType::SubscribeResponse => v.verify_union_variant::>("ContractResponseType::SubscribeResponse", pos), _ => Ok(()), } })? @@ -1436,7 +1451,7 @@ pub mod host_response { } pub struct ContractResponseArgs { pub contract_response_type: ContractResponseType, - pub contract_response: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>, + pub contract_response: Option>, } impl<'a> Default for ContractResponseArgs { #[inline] @@ -1448,11 +1463,11 @@ pub mod host_response { } } - pub struct ContractResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ContractResponseBuilder<'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> ContractResponseBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContractResponseBuilder<'a, 'b, A> { #[inline] pub fn add_contract_response_type(&mut self, contract_response_type: ContractResponseType) { self.fbb_.push_slot::( @@ -1464,16 +1479,16 @@ pub mod host_response { #[inline] pub fn add_contract_response( &mut self, - contract_response: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>, + contract_response: flatbuffers::WIPOffset, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( ContractResponse::VT_CONTRACT_RESPONSE, contract_response, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ContractResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); ContractResponseBuilder { @@ -1482,19 +1497,19 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required( o, ContractResponse::VT_CONTRACT_RESPONSE, "contract_response", ); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ContractResponse<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ContractResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ContractResponse"); ds.field("contract_response_type", &self.contract_response_type()); match self.contract_response_type() { @@ -1570,25 +1585,25 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct DelegateKey<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for DelegateKey<'a> { + impl<'a> flatbuffers::Follow<'a> for DelegateKey<'a> { type Inner = DelegateKey<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> DelegateKey<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_CODE_HASH: ::flatbuffers::VOffsetT = 6; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_CODE_HASH: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { DelegateKey { _tab: table } } #[allow(unused_mut)] @@ -1596,11 +1611,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args DelegateKeyArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = DelegateKeyBuilder::new(_fbb); if let Some(x) = args.code_hash { builder.add_code_hash(x); @@ -1612,13 +1627,13 @@ pub mod host_response { } #[inline] - pub fn key(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn key(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( DelegateKey::VT_KEY, None, ) @@ -1626,13 +1641,13 @@ pub mod host_response { } } #[inline] - pub fn code_hash(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn code_hash(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( DelegateKey::VT_CODE_HASH, None, ) @@ -1641,19 +1656,20 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for DelegateKey<'_> { + impl flatbuffers::Verifiable for DelegateKey<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "key", Self::VT_KEY, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "code_hash", Self::VT_CODE_HASH, true, @@ -1663,8 +1679,8 @@ pub mod host_response { } } pub struct DelegateKeyArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, - pub code_hash: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub key: Option>>, + pub code_hash: Option>>, } impl<'a> Default for DelegateKeyArgs<'a> { #[inline] @@ -1676,29 +1692,29 @@ pub mod host_response { } } - pub struct DelegateKeyBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct DelegateKeyBuilder<'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> DelegateKeyBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DelegateKeyBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(DelegateKey::VT_KEY, key); + .push_slot_always::>(DelegateKey::VT_KEY, key); } #[inline] pub fn add_code_hash( &mut self, - code_hash: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + code_hash: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( DelegateKey::VT_CODE_HASH, code_hash, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> DelegateKeyBuilder<'a, 'b, A> { let start = _fbb.start_table(); DelegateKeyBuilder { @@ -1707,17 +1723,17 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, DelegateKey::VT_KEY, "key"); self.fbb_ .required(o, DelegateKey::VT_CODE_HASH, "code_hash"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for DelegateKey<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for DelegateKey<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DelegateKey"); ds.field("key", &self.key()); ds.field("code_hash", &self.code_hash()); @@ -1728,26 +1744,26 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct UserInputRequest<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for UserInputRequest<'a> { + impl<'a> flatbuffers::Follow<'a> for UserInputRequest<'a> { type Inner = UserInputRequest<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> UserInputRequest<'a> { - pub const VT_REQUEST_ID: ::flatbuffers::VOffsetT = 4; - pub const VT_MESSAGE: ::flatbuffers::VOffsetT = 6; - pub const VT_RESPONSES: ::flatbuffers::VOffsetT = 8; + pub const VT_REQUEST_ID: flatbuffers::VOffsetT = 4; + pub const VT_MESSAGE: flatbuffers::VOffsetT = 6; + pub const VT_RESPONSES: flatbuffers::VOffsetT = 8; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { UserInputRequest { _tab: table } } #[allow(unused_mut)] @@ -1755,11 +1771,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args UserInputRequestArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = UserInputRequestBuilder::new(_fbb); if let Some(x) = args.responses { builder.add_responses(x); @@ -1783,13 +1799,13 @@ pub mod host_response { } } #[inline] - pub fn message(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn message(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( UserInputRequest::VT_MESSAGE, None, ) @@ -1799,35 +1815,36 @@ pub mod host_response { #[inline] pub fn responses( &self, - ) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>> { + ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset< - ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>, + .get::>, >>(UserInputRequest::VT_RESPONSES, None) .unwrap() } } } - impl ::flatbuffers::Verifiable for UserInputRequest<'_> { + impl flatbuffers::Verifiable for UserInputRequest<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_field::("request_id", Self::VT_REQUEST_ID, false)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "message", Self::VT_MESSAGE, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset< - ::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset>, + .visit_field::>, >>("responses", Self::VT_RESPONSES, true)? .finish(); Ok(()) @@ -1835,10 +1852,10 @@ pub mod host_response { } pub struct UserInputRequestArgs<'a> { pub request_id: u32, - pub message: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub message: Option>>, pub responses: Option< - ::flatbuffers::WIPOffset< - ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>>, + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, >, >, } @@ -1853,11 +1870,11 @@ pub mod host_response { } } - pub struct UserInputRequestBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct UserInputRequestBuilder<'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> UserInputRequestBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UserInputRequestBuilder<'a, 'b, A> { #[inline] pub fn add_request_id(&mut self, request_id: u32) { self.fbb_ @@ -1866,9 +1883,9 @@ pub mod host_response { #[inline] pub fn add_message( &mut self, - message: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + message: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( UserInputRequest::VT_MESSAGE, message, ); @@ -1876,18 +1893,18 @@ pub mod host_response { #[inline] pub fn add_responses( &mut self, - responses: ::flatbuffers::WIPOffset< - ::flatbuffers::Vector<'b, ::flatbuffers::ForwardsUOffset>>, + responses: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, >, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( UserInputRequest::VT_RESPONSES, responses, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> UserInputRequestBuilder<'a, 'b, A> { let start = _fbb.start_table(); UserInputRequestBuilder { @@ -1896,18 +1913,18 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, UserInputRequest::VT_MESSAGE, "message"); self.fbb_ .required(o, UserInputRequest::VT_RESPONSES, "responses"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for UserInputRequest<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for UserInputRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("UserInputRequest"); ds.field("request_id", &self.request_id()); ds.field("message", &self.message()); @@ -1919,24 +1936,24 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct ClientResponse<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ClientResponse<'a> { + impl<'a> flatbuffers::Follow<'a> for ClientResponse<'a> { type Inner = ClientResponse<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ClientResponse<'a> { - pub const VT_DATA: ::flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ClientResponse { _tab: table } } #[allow(unused_mut)] @@ -1944,11 +1961,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ClientResponseArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ClientResponseBuilder::new(_fbb); if let Some(x) = args.data { builder.add_data(x); @@ -1957,13 +1974,13 @@ pub mod host_response { } #[inline] - pub fn data(&self) -> Option<::flatbuffers::Vector<'a, u8>> { + 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::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( ClientResponse::VT_DATA, None, ) @@ -1971,14 +1988,15 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for ClientResponse<'_> { + impl flatbuffers::Verifiable for ClientResponse<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "data", Self::VT_DATA, false, @@ -1988,7 +2006,7 @@ pub mod host_response { } } pub struct ClientResponseArgs<'a> { - pub data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub data: Option>>, } impl<'a> Default for ClientResponseArgs<'a> { #[inline] @@ -1997,19 +2015,19 @@ pub mod host_response { } } - pub struct ClientResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ClientResponseBuilder<'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> ClientResponseBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ClientResponseBuilder<'a, 'b, A> { #[inline] - pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(ClientResponse::VT_DATA, data); + .push_slot_always::>(ClientResponse::VT_DATA, data); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ClientResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); ClientResponseBuilder { @@ -2018,14 +2036,14 @@ pub mod host_response { } } #[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()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ClientResponse<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ClientResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ClientResponse"); ds.field("data", &self.data()); ds.finish() @@ -2035,26 +2053,26 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct RequestUserInput<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for RequestUserInput<'a> { + impl<'a> flatbuffers::Follow<'a> for RequestUserInput<'a> { type Inner = RequestUserInput<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> RequestUserInput<'a> { - pub const VT_REQUEST_ID: ::flatbuffers::VOffsetT = 4; - pub const VT_MESSAGE: ::flatbuffers::VOffsetT = 6; - pub const VT_RESPONSES: ::flatbuffers::VOffsetT = 8; + pub const VT_REQUEST_ID: flatbuffers::VOffsetT = 4; + pub const VT_MESSAGE: flatbuffers::VOffsetT = 6; + pub const VT_RESPONSES: flatbuffers::VOffsetT = 8; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { RequestUserInput { _tab: table } } #[allow(unused_mut)] @@ -2062,11 +2080,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args RequestUserInputArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = RequestUserInputBuilder::new(_fbb); if let Some(x) = args.responses { builder.add_responses(x); @@ -2090,13 +2108,13 @@ pub mod host_response { } } #[inline] - pub fn message(&self) -> Option<::flatbuffers::Vector<'a, u8>> { + pub fn message(&self) -> Option> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( RequestUserInput::VT_MESSAGE, None, ) @@ -2105,35 +2123,36 @@ pub mod host_response { #[inline] pub fn responses( &self, - ) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>> { + ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset< - ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>, + .get::>, >>(RequestUserInput::VT_RESPONSES, None) .unwrap() } } } - impl ::flatbuffers::Verifiable for RequestUserInput<'_> { + impl flatbuffers::Verifiable for RequestUserInput<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_field::("request_id", Self::VT_REQUEST_ID, false)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "message", Self::VT_MESSAGE, false, )? - .visit_field::<::flatbuffers::ForwardsUOffset< - ::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset>, + .visit_field::>, >>("responses", Self::VT_RESPONSES, true)? .finish(); Ok(()) @@ -2141,10 +2160,10 @@ pub mod host_response { } pub struct RequestUserInputArgs<'a> { pub request_id: u32, - pub message: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub message: Option>>, pub responses: Option< - ::flatbuffers::WIPOffset< - ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>>, + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, >, >, } @@ -2159,11 +2178,11 @@ pub mod host_response { } } - pub struct RequestUserInputBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct RequestUserInputBuilder<'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> RequestUserInputBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RequestUserInputBuilder<'a, 'b, A> { #[inline] pub fn add_request_id(&mut self, request_id: u32) { self.fbb_ @@ -2172,9 +2191,9 @@ pub mod host_response { #[inline] pub fn add_message( &mut self, - message: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + message: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( RequestUserInput::VT_MESSAGE, message, ); @@ -2182,18 +2201,18 @@ pub mod host_response { #[inline] pub fn add_responses( &mut self, - responses: ::flatbuffers::WIPOffset< - ::flatbuffers::Vector<'b, ::flatbuffers::ForwardsUOffset>>, + responses: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, >, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( RequestUserInput::VT_RESPONSES, responses, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> RequestUserInputBuilder<'a, 'b, A> { let start = _fbb.start_table(); RequestUserInputBuilder { @@ -2202,16 +2221,16 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, RequestUserInput::VT_RESPONSES, "responses"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for RequestUserInput<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for RequestUserInput<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("RequestUserInput"); ds.field("request_id", &self.request_id()); ds.field("message", &self.message()); @@ -2223,24 +2242,24 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct ContextUpdated<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for ContextUpdated<'a> { + impl<'a> flatbuffers::Follow<'a> for ContextUpdated<'a> { type Inner = ContextUpdated<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> ContextUpdated<'a> { - pub const VT_CONTEXT: ::flatbuffers::VOffsetT = 4; + pub const VT_CONTEXT: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { ContextUpdated { _tab: table } } #[allow(unused_mut)] @@ -2248,11 +2267,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ContextUpdatedArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ContextUpdatedBuilder::new(_fbb); if let Some(x) = args.context { builder.add_context(x); @@ -2261,13 +2280,13 @@ pub mod host_response { } #[inline] - pub fn context(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn context(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( ContextUpdated::VT_CONTEXT, None, ) @@ -2276,14 +2295,15 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for ContextUpdated<'_> { + impl flatbuffers::Verifiable for ContextUpdated<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "context", Self::VT_CONTEXT, true, @@ -2293,7 +2313,7 @@ pub mod host_response { } } pub struct ContextUpdatedArgs<'a> { - pub context: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub context: Option>>, } impl<'a> Default for ContextUpdatedArgs<'a> { #[inline] @@ -2304,24 +2324,22 @@ pub mod host_response { } } - pub struct ContextUpdatedBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ContextUpdatedBuilder<'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> ContextUpdatedBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContextUpdatedBuilder<'a, 'b, A> { #[inline] pub fn add_context( &mut self, - context: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + context: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( - ContextUpdated::VT_CONTEXT, - context, - ); + self.fbb_ + .push_slot_always::>(ContextUpdated::VT_CONTEXT, context); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> ContextUpdatedBuilder<'a, 'b, A> { let start = _fbb.start_table(); ContextUpdatedBuilder { @@ -2330,15 +2348,15 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, ContextUpdated::VT_CONTEXT, "context"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for ContextUpdated<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for ContextUpdated<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ContextUpdated"); ds.field("context", &self.context()); ds.finish() @@ -2348,25 +2366,25 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct OutboundDelegateMsg<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for OutboundDelegateMsg<'a> { + impl<'a> flatbuffers::Follow<'a> for OutboundDelegateMsg<'a> { type Inner = OutboundDelegateMsg<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> OutboundDelegateMsg<'a> { - pub const VT_INBOUND_TYPE: ::flatbuffers::VOffsetT = 4; - pub const VT_INBOUND: ::flatbuffers::VOffsetT = 6; + pub const VT_INBOUND_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_INBOUND: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { OutboundDelegateMsg { _tab: table } } #[allow(unused_mut)] @@ -2374,11 +2392,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args OutboundDelegateMsgArgs, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = OutboundDelegateMsgBuilder::new(_fbb); if let Some(x) = args.inbound { builder.add_inbound(x); @@ -2402,13 +2420,13 @@ pub mod host_response { } } #[inline] - pub fn inbound(&self) -> ::flatbuffers::Table<'a> { + pub fn inbound(&self) -> flatbuffers::Table<'a> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>( + .get::>>( OutboundDelegateMsg::VT_INBOUND, None, ) @@ -2460,18 +2478,19 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for OutboundDelegateMsg<'_> { + impl flatbuffers::Verifiable for OutboundDelegateMsg<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_union::("inbound_type", Self::VT_INBOUND_TYPE, "inbound", Self::VT_INBOUND, true, |key, v, pos| { match key { - OutboundDelegateMsgType::common_ApplicationMessage => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("OutboundDelegateMsgType::common_ApplicationMessage", pos), - OutboundDelegateMsgType::RequestUserInput => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("OutboundDelegateMsgType::RequestUserInput", pos), - OutboundDelegateMsgType::ContextUpdated => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("OutboundDelegateMsgType::ContextUpdated", pos), + OutboundDelegateMsgType::common_ApplicationMessage => v.verify_union_variant::>("OutboundDelegateMsgType::common_ApplicationMessage", pos), + OutboundDelegateMsgType::RequestUserInput => v.verify_union_variant::>("OutboundDelegateMsgType::RequestUserInput", pos), + OutboundDelegateMsgType::ContextUpdated => v.verify_union_variant::>("OutboundDelegateMsgType::ContextUpdated", pos), _ => Ok(()), } })? @@ -2481,7 +2500,7 @@ pub mod host_response { } pub struct OutboundDelegateMsgArgs { pub inbound_type: OutboundDelegateMsgType, - pub inbound: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>, + pub inbound: Option>, } impl<'a> Default for OutboundDelegateMsgArgs { #[inline] @@ -2493,11 +2512,11 @@ pub mod host_response { } } - pub struct OutboundDelegateMsgBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct OutboundDelegateMsgBuilder<'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> OutboundDelegateMsgBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> OutboundDelegateMsgBuilder<'a, 'b, A> { #[inline] pub fn add_inbound_type(&mut self, inbound_type: OutboundDelegateMsgType) { self.fbb_.push_slot::( @@ -2509,16 +2528,16 @@ pub mod host_response { #[inline] pub fn add_inbound( &mut self, - inbound: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>, + inbound: flatbuffers::WIPOffset, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( OutboundDelegateMsg::VT_INBOUND, inbound, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> OutboundDelegateMsgBuilder<'a, 'b, A> { let start = _fbb.start_table(); OutboundDelegateMsgBuilder { @@ -2527,16 +2546,16 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, OutboundDelegateMsg::VT_INBOUND, "inbound"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for OutboundDelegateMsg<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for OutboundDelegateMsg<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("OutboundDelegateMsg"); ds.field("inbound_type", &self.inbound_type()); match self.inbound_type() { @@ -2582,25 +2601,25 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct DelegateResponse<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for DelegateResponse<'a> { + impl<'a> flatbuffers::Follow<'a> for DelegateResponse<'a> { type Inner = DelegateResponse<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> DelegateResponse<'a> { - pub const VT_KEY: ::flatbuffers::VOffsetT = 4; - pub const VT_VALUES: ::flatbuffers::VOffsetT = 6; + pub const VT_KEY: flatbuffers::VOffsetT = 4; + pub const VT_VALUES: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { DelegateResponse { _tab: table } } #[allow(unused_mut)] @@ -2608,11 +2627,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args DelegateResponseArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = DelegateResponseBuilder::new(_fbb); if let Some(x) = args.values { builder.add_values(x); @@ -2630,7 +2649,7 @@ pub mod host_response { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset>( + .get::>( DelegateResponse::VT_KEY, None, ) @@ -2640,48 +2659,46 @@ pub mod host_response { #[inline] pub fn values( &self, - ) -> ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>> + ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset< - ::flatbuffers::Vector< - 'a, - ::flatbuffers::ForwardsUOffset, - >, + .get::>, >>(DelegateResponse::VT_VALUES, None) .unwrap() } } } - impl ::flatbuffers::Verifiable for DelegateResponse<'_> { + impl flatbuffers::Verifiable for DelegateResponse<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset>( + .visit_field::>( "key", Self::VT_KEY, true, )? - .visit_field::<::flatbuffers::ForwardsUOffset< - ::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset>, + .visit_field::>, >>("values", Self::VT_VALUES, true)? .finish(); Ok(()) } } pub struct DelegateResponseArgs<'a> { - pub key: Option<::flatbuffers::WIPOffset>>, + pub key: Option>>, pub values: Option< - ::flatbuffers::WIPOffset< - ::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset>>, + flatbuffers::WIPOffset< + flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset>>, >, >, } @@ -2695,15 +2712,15 @@ pub mod host_response { } } - pub struct DelegateResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct DelegateResponseBuilder<'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> DelegateResponseBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DelegateResponseBuilder<'a, 'b, A> { #[inline] - pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset>) { + pub fn add_key(&mut self, key: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset>( + .push_slot_always::>( DelegateResponse::VT_KEY, key, ); @@ -2711,18 +2728,16 @@ pub mod host_response { #[inline] pub fn add_values( &mut self, - values: ::flatbuffers::WIPOffset< - ::flatbuffers::Vector<'b, ::flatbuffers::ForwardsUOffset>>, + values: flatbuffers::WIPOffset< + flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset>>, >, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( - DelegateResponse::VT_VALUES, - values, - ); + self.fbb_ + .push_slot_always::>(DelegateResponse::VT_VALUES, values); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> DelegateResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); DelegateResponseBuilder { @@ -2731,16 +2746,16 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, DelegateResponse::VT_KEY, "key"); self.fbb_.required(o, DelegateResponse::VT_VALUES, "values"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for DelegateResponse<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for DelegateResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DelegateResponse"); ds.field("key", &self.key()); ds.field("values", &self.values()); @@ -2751,24 +2766,24 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct GenerateRandData<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for GenerateRandData<'a> { + impl<'a> flatbuffers::Follow<'a> for GenerateRandData<'a> { type Inner = GenerateRandData<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> GenerateRandData<'a> { - pub const VT_WRAPPED_STATE: ::flatbuffers::VOffsetT = 4; + pub const VT_WRAPPED_STATE: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { GenerateRandData { _tab: table } } #[allow(unused_mut)] @@ -2776,11 +2791,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args GenerateRandDataArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = GenerateRandDataBuilder::new(_fbb); if let Some(x) = args.wrapped_state { builder.add_wrapped_state(x); @@ -2789,13 +2804,13 @@ pub mod host_response { } #[inline] - pub fn wrapped_state(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn wrapped_state(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( GenerateRandData::VT_WRAPPED_STATE, None, ) @@ -2804,14 +2819,15 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for GenerateRandData<'_> { + impl flatbuffers::Verifiable for GenerateRandData<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "wrapped_state", Self::VT_WRAPPED_STATE, true, @@ -2821,7 +2837,7 @@ pub mod host_response { } } pub struct GenerateRandDataArgs<'a> { - pub wrapped_state: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub wrapped_state: Option>>, } impl<'a> Default for GenerateRandDataArgs<'a> { #[inline] @@ -2832,24 +2848,24 @@ pub mod host_response { } } - pub struct GenerateRandDataBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct GenerateRandDataBuilder<'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> GenerateRandDataBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GenerateRandDataBuilder<'a, 'b, A> { #[inline] pub fn add_wrapped_state( &mut self, - wrapped_state: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>, + wrapped_state: flatbuffers::WIPOffset>, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( + self.fbb_.push_slot_always::>( GenerateRandData::VT_WRAPPED_STATE, wrapped_state, ); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> GenerateRandDataBuilder<'a, 'b, A> { let start = _fbb.start_table(); GenerateRandDataBuilder { @@ -2858,16 +2874,16 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_ .required(o, GenerateRandData::VT_WRAPPED_STATE, "wrapped_state"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for GenerateRandData<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for GenerateRandData<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("GenerateRandData"); ds.field("wrapped_state", &self.wrapped_state()); ds.finish() @@ -2877,27 +2893,27 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct StreamChunk<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for StreamChunk<'a> { + impl<'a> flatbuffers::Follow<'a> for StreamChunk<'a> { type Inner = StreamChunk<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> StreamChunk<'a> { - pub const VT_STREAM_ID: ::flatbuffers::VOffsetT = 4; - pub const VT_INDEX: ::flatbuffers::VOffsetT = 6; - pub const VT_TOTAL: ::flatbuffers::VOffsetT = 8; - pub const VT_DATA: ::flatbuffers::VOffsetT = 10; + pub const VT_STREAM_ID: flatbuffers::VOffsetT = 4; + pub const VT_INDEX: flatbuffers::VOffsetT = 6; + pub const VT_TOTAL: flatbuffers::VOffsetT = 8; + pub const VT_DATA: flatbuffers::VOffsetT = 10; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { StreamChunk { _tab: table } } #[allow(unused_mut)] @@ -2905,11 +2921,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args StreamChunkArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = StreamChunkBuilder::new(_fbb); if let Some(x) = args.data { builder.add_data(x); @@ -2954,13 +2970,13 @@ pub mod host_response { } } #[inline] - pub fn data(&self) -> ::flatbuffers::Vector<'a, u8> { + pub fn data(&self) -> flatbuffers::Vector<'a, u8> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, u8>>>( + .get::>>( StreamChunk::VT_DATA, None, ) @@ -2969,17 +2985,18 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for StreamChunk<'_> { + impl flatbuffers::Verifiable for StreamChunk<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_field::("stream_id", Self::VT_STREAM_ID, false)? .visit_field::("index", Self::VT_INDEX, false)? .visit_field::("total", Self::VT_TOTAL, false)? - .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, u8>>>( + .visit_field::>>( "data", Self::VT_DATA, true, @@ -2992,7 +3009,7 @@ pub mod host_response { pub stream_id: u32, pub index: u32, pub total: u32, - pub data: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, u8>>>, + pub data: Option>>, } impl<'a> Default for StreamChunkArgs<'a> { #[inline] @@ -3006,11 +3023,11 @@ pub mod host_response { } } - pub struct StreamChunkBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct StreamChunkBuilder<'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> StreamChunkBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StreamChunkBuilder<'a, 'b, A> { #[inline] pub fn add_stream_id(&mut self, stream_id: u32) { self.fbb_ @@ -3025,13 +3042,13 @@ pub mod host_response { self.fbb_.push_slot::(StreamChunk::VT_TOTAL, total, 0); } #[inline] - pub fn add_data(&mut self, data: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b, u8>>) { + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(StreamChunk::VT_DATA, data); + .push_slot_always::>(StreamChunk::VT_DATA, data); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> StreamChunkBuilder<'a, 'b, A> { let start = _fbb.start_table(); StreamChunkBuilder { @@ -3040,15 +3057,15 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, StreamChunk::VT_DATA, "data"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for StreamChunk<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for StreamChunk<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("StreamChunk"); ds.field("stream_id", &self.stream_id()); ds.field("index", &self.index()); @@ -3061,24 +3078,24 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct Ok<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for Ok<'a> { + impl<'a> flatbuffers::Follow<'a> for Ok<'a> { type Inner = Ok<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> Ok<'a> { - pub const VT_MSG: ::flatbuffers::VOffsetT = 4; + pub const VT_MSG: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Ok { _tab: table } } #[allow(unused_mut)] @@ -3086,11 +3103,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args OkArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = OkBuilder::new(_fbb); if let Some(x) = args.msg { builder.add_msg(x); @@ -3105,26 +3122,27 @@ pub mod host_response { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<&str>>(Ok::VT_MSG, None) + .get::>(Ok::VT_MSG, None) .unwrap() } } } - impl ::flatbuffers::Verifiable for Ok<'_> { + impl flatbuffers::Verifiable for Ok<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("msg", Self::VT_MSG, true)? + .visit_field::>("msg", Self::VT_MSG, true)? .finish(); Ok(()) } } pub struct OkArgs<'a> { - pub msg: Option<::flatbuffers::WIPOffset<&'a str>>, + pub msg: Option>, } impl<'a> Default for OkArgs<'a> { #[inline] @@ -3135,18 +3153,18 @@ pub mod host_response { } } - pub struct OkBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct OkBuilder<'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> OkBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> OkBuilder<'a, 'b, A> { #[inline] - pub fn add_msg(&mut self, msg: ::flatbuffers::WIPOffset<&'b str>) { + pub fn add_msg(&mut self, msg: flatbuffers::WIPOffset<&'b str>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(Ok::VT_MSG, msg); + .push_slot_always::>(Ok::VT_MSG, msg); } #[inline] - pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> OkBuilder<'a, 'b, A> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> OkBuilder<'a, 'b, A> { let start = _fbb.start_table(); OkBuilder { fbb_: _fbb, @@ -3154,15 +3172,15 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, Ok::VT_MSG, "msg"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for Ok<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for Ok<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Ok"); ds.field("msg", &self.msg()); ds.finish() @@ -3172,24 +3190,24 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct Error<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for Error<'a> { + impl<'a> flatbuffers::Follow<'a> for Error<'a> { type Inner = Error<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> Error<'a> { - pub const VT_MSG: ::flatbuffers::VOffsetT = 4; + pub const VT_MSG: flatbuffers::VOffsetT = 4; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { Error { _tab: table } } #[allow(unused_mut)] @@ -3197,11 +3215,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args ErrorArgs<'args>, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = ErrorBuilder::new(_fbb); if let Some(x) = args.msg { builder.add_msg(x); @@ -3216,26 +3234,27 @@ pub mod host_response { // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<&str>>(Error::VT_MSG, None) + .get::>(Error::VT_MSG, None) .unwrap() } } } - impl ::flatbuffers::Verifiable for Error<'_> { + impl flatbuffers::Verifiable for Error<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("msg", Self::VT_MSG, true)? + .visit_field::>("msg", Self::VT_MSG, true)? .finish(); Ok(()) } } pub struct ErrorArgs<'a> { - pub msg: Option<::flatbuffers::WIPOffset<&'a str>>, + pub msg: Option>, } impl<'a> Default for ErrorArgs<'a> { #[inline] @@ -3246,20 +3265,18 @@ pub mod host_response { } } - pub struct ErrorBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct ErrorBuilder<'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> ErrorBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ErrorBuilder<'a, 'b, A> { #[inline] - pub fn add_msg(&mut self, msg: ::flatbuffers::WIPOffset<&'b str>) { + pub fn add_msg(&mut self, msg: flatbuffers::WIPOffset<&'b str>) { self.fbb_ - .push_slot_always::<::flatbuffers::WIPOffset<_>>(Error::VT_MSG, msg); + .push_slot_always::>(Error::VT_MSG, msg); } #[inline] - pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - ) -> ErrorBuilder<'a, 'b, A> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ErrorBuilder<'a, 'b, A> { let start = _fbb.start_table(); ErrorBuilder { fbb_: _fbb, @@ -3267,15 +3284,15 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, Error::VT_MSG, "msg"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for Error<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for Error<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Error"); ds.field("msg", &self.msg()); ds.finish() @@ -3285,25 +3302,25 @@ pub mod host_response { #[derive(Copy, Clone, PartialEq)] pub struct HostResponse<'a> { - pub _tab: ::flatbuffers::Table<'a>, + pub _tab: flatbuffers::Table<'a>, } - impl<'a> ::flatbuffers::Follow<'a> for HostResponse<'a> { + impl<'a> flatbuffers::Follow<'a> for HostResponse<'a> { type Inner = HostResponse<'a>; #[inline] unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { - _tab: unsafe { ::flatbuffers::Table::new(buf, loc) }, + _tab: flatbuffers::Table::new(buf, loc), } } } impl<'a> HostResponse<'a> { - pub const VT_RESPONSE_TYPE: ::flatbuffers::VOffsetT = 4; - pub const VT_RESPONSE: ::flatbuffers::VOffsetT = 6; + pub const VT_RESPONSE_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_RESPONSE: flatbuffers::VOffsetT = 6; #[inline] - pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { HostResponse { _tab: table } } #[allow(unused_mut)] @@ -3311,11 +3328,11 @@ pub mod host_response { 'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, - A: ::flatbuffers::Allocator + 'bldr, + A: flatbuffers::Allocator + 'bldr, >( - _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>, args: &'args HostResponseArgs, - ) -> ::flatbuffers::WIPOffset> { + ) -> flatbuffers::WIPOffset> { let mut builder = HostResponseBuilder::new(_fbb); if let Some(x) = args.response { builder.add_response(x); @@ -3339,13 +3356,13 @@ pub mod host_response { } } #[inline] - pub fn response(&self) -> ::flatbuffers::Table<'a> { + pub fn response(&self) -> flatbuffers::Table<'a> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot unsafe { self._tab - .get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Table<'a>>>( + .get::>>( HostResponse::VT_RESPONSE, None, ) @@ -3437,31 +3454,61 @@ pub mod host_response { } } - impl ::flatbuffers::Verifiable for HostResponse<'_> { + impl flatbuffers::Verifiable for HostResponse<'_> { #[inline] fn run_verifier( - v: &mut ::flatbuffers::Verifier, + v: &mut flatbuffers::Verifier, pos: usize, - ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_union::("response_type", Self::VT_RESPONSE_TYPE, "response", Self::VT_RESPONSE, true, |key, v, pos| { - match key { - HostResponseType::ContractResponse => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("HostResponseType::ContractResponse", pos), - HostResponseType::DelegateResponse => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("HostResponseType::DelegateResponse", pos), - HostResponseType::GenerateRandData => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("HostResponseType::GenerateRandData", pos), - HostResponseType::Ok => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("HostResponseType::Ok", pos), - HostResponseType::Error => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("HostResponseType::Error", pos), - HostResponseType::StreamChunk => v.verify_union_variant::<::flatbuffers::ForwardsUOffset>("HostResponseType::StreamChunk", pos), - _ => Ok(()), - } - })? - .finish(); + .visit_union::( + "response_type", + Self::VT_RESPONSE_TYPE, + "response", + Self::VT_RESPONSE, + true, + |key, v, pos| match key { + HostResponseType::ContractResponse => v + .verify_union_variant::>( + "HostResponseType::ContractResponse", + pos, + ), + HostResponseType::DelegateResponse => v + .verify_union_variant::>( + "HostResponseType::DelegateResponse", + pos, + ), + HostResponseType::GenerateRandData => v + .verify_union_variant::>( + "HostResponseType::GenerateRandData", + pos, + ), + HostResponseType::Ok => v + .verify_union_variant::>( + "HostResponseType::Ok", + pos, + ), + HostResponseType::Error => v + .verify_union_variant::>( + "HostResponseType::Error", + pos, + ), + HostResponseType::StreamChunk => v + .verify_union_variant::>( + "HostResponseType::StreamChunk", + pos, + ), + _ => Ok(()), + }, + )? + .finish(); Ok(()) } } pub struct HostResponseArgs { pub response_type: HostResponseType, - pub response: Option<::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>>, + pub response: Option>, } impl<'a> Default for HostResponseArgs { #[inline] @@ -3473,11 +3520,11 @@ pub mod host_response { } } - pub struct HostResponseBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { - fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, + pub struct HostResponseBuilder<'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> HostResponseBuilder<'a, 'b, A> { + impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> HostResponseBuilder<'a, 'b, A> { #[inline] pub fn add_response_type(&mut self, response_type: HostResponseType) { self.fbb_.push_slot::( @@ -3489,16 +3536,14 @@ pub mod host_response { #[inline] pub fn add_response( &mut self, - response: ::flatbuffers::WIPOffset<::flatbuffers::UnionWIPOffset>, + response: flatbuffers::WIPOffset, ) { - self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>( - HostResponse::VT_RESPONSE, - response, - ); + self.fbb_ + .push_slot_always::>(HostResponse::VT_RESPONSE, response); } #[inline] pub fn new( - _fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, + _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, ) -> HostResponseBuilder<'a, 'b, A> { let start = _fbb.start_table(); HostResponseBuilder { @@ -3507,15 +3552,15 @@ pub mod host_response { } } #[inline] - pub fn finish(self) -> ::flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); self.fbb_.required(o, HostResponse::VT_RESPONSE, "response"); - ::flatbuffers::WIPOffset::new(o.value()) + flatbuffers::WIPOffset::new(o.value()) } } - impl ::core::fmt::Debug for HostResponse<'_> { - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + impl core::fmt::Debug for HostResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("HostResponse"); ds.field("response_type", &self.response_type()); match self.response_type() { @@ -3596,8 +3641,8 @@ pub mod host_response { /// `root_as_host_response_unchecked`. pub fn root_as_host_response( buf: &[u8], - ) -> Result, ::flatbuffers::InvalidFlatbuffer> { - ::flatbuffers::root::(buf) + ) -> Result { + flatbuffers::root::(buf) } #[inline] /// Verifies that a buffer of bytes contains a size prefixed @@ -3608,8 +3653,8 @@ pub mod host_response { /// `size_prefixed_root_as_host_response_unchecked`. pub fn size_prefixed_root_as_host_response( buf: &[u8], - ) -> Result, ::flatbuffers::InvalidFlatbuffer> { - ::flatbuffers::size_prefixed_root::(buf) + ) -> Result { + flatbuffers::size_prefixed_root::(buf) } #[inline] /// Verifies, with the given options, that a buffer of bytes @@ -3619,10 +3664,10 @@ pub mod host_response { /// previous, unchecked, behavior use /// `root_as_host_response_unchecked`. pub fn root_as_host_response_with_opts<'b, 'o>( - opts: &'o ::flatbuffers::VerifierOptions, + opts: &'o flatbuffers::VerifierOptions, buf: &'b [u8], - ) -> Result, ::flatbuffers::InvalidFlatbuffer> { - ::flatbuffers::root_with_opts::>(opts, buf) + ) -> Result, flatbuffers::InvalidFlatbuffer> { + flatbuffers::root_with_opts::>(opts, buf) } #[inline] /// Verifies, with the given verifier options, that a buffer of @@ -3632,37 +3677,37 @@ pub mod host_response { /// previous, unchecked, behavior use /// `root_as_host_response_unchecked`. pub fn size_prefixed_root_as_host_response_with_opts<'b, 'o>( - opts: &'o ::flatbuffers::VerifierOptions, + opts: &'o flatbuffers::VerifierOptions, buf: &'b [u8], - ) -> Result, ::flatbuffers::InvalidFlatbuffer> { - ::flatbuffers::size_prefixed_root_with_opts::>(opts, buf) + ) -> Result, flatbuffers::InvalidFlatbuffer> { + flatbuffers::size_prefixed_root_with_opts::>(opts, buf) } #[inline] /// Assumes, without verification, that a buffer of bytes contains a HostResponse and returns it. /// # Safety /// Callers must trust the given bytes do indeed contain a valid `HostResponse`. - pub unsafe fn root_as_host_response_unchecked(buf: &[u8]) -> HostResponse<'_> { - unsafe { ::flatbuffers::root_unchecked::(buf) } + pub unsafe fn root_as_host_response_unchecked(buf: &[u8]) -> HostResponse { + flatbuffers::root_unchecked::(buf) } #[inline] /// Assumes, without verification, that a buffer of bytes contains a size prefixed HostResponse and returns it. /// # Safety /// Callers must trust the given bytes do indeed contain a valid size prefixed `HostResponse`. - pub unsafe fn size_prefixed_root_as_host_response_unchecked(buf: &[u8]) -> HostResponse<'_> { - unsafe { ::flatbuffers::size_prefixed_root_unchecked::(buf) } + pub unsafe fn size_prefixed_root_as_host_response_unchecked(buf: &[u8]) -> HostResponse { + flatbuffers::size_prefixed_root_unchecked::(buf) } #[inline] - pub fn finish_host_response_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>( - fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - root: ::flatbuffers::WIPOffset>, + pub fn finish_host_response_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>( + fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + root: flatbuffers::WIPOffset>, ) { fbb.finish(root, None); } #[inline] - pub fn finish_size_prefixed_host_response_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>( - fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, - root: ::flatbuffers::WIPOffset>, + pub fn finish_size_prefixed_host_response_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>( + fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, + root: flatbuffers::WIPOffset>, ) { fbb.finish_size_prefixed(root, None); } From eba9e65c1b4b668c4a69eba2b7eddf42076bc027 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Tue, 1 Sep 2026 09:21:13 -0500 Subject: [PATCH 3/9] build: fail loudly on a regeneration that cannot run, and treat untracked bindings as drift Both from external review of this PR. An explicitly requested regeneration that quietly regenerates nothing was the same silent no-op this change exists to remove. It was worse here than in the code it replaced: cargo caches a SUCCESSFUL build-script run keyed on the declared inputs, so warn-and-return would be recorded as success, and installing the right compiler and re-running the documented command could legitimately not execute the script again -- leaving the bindings stale while the developer believed they had regenerated. Every failure on the regeneration path now panics, which is not cached and cannot be missed. Verified: with flatc 2.0.8 first on PATH the build fails naming both versions and where to get the right one. The staleness check now reads `git status --porcelain` rather than `git diff --exit-code`, because a diff ignores untracked files. A new .fbs generates entirely NEW binding files, so the loudest possible drift -- a schema merging with no committed bindings at all -- was the one case that sailed past the check. The pinned flatc download also moves to RUNNER_TEMP so the archive cannot itself register as untracked drift. [AI-assisted - Claude] --- .github/workflows/ci.yml | 28 ++++++++++++++------ rust/build.rs | 56 +++++++++++++++++++++------------------- 2 files changed, 50 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 785db41..8588c2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,13 +160,16 @@ jobs: # differently, so this job compares against one specific compiler; bump it # and PINNED_FLATC in rust/build.rs together, in a commit that also # regenerates. + # Downloaded outside the checkout on purpose: anything left in the working + # tree would show up as untracked, and the staleness check below treats + # untracked files as drift. - name: Install pinned flatc env: FLATC_VERSION: 24.3.25 run: | - curl -sSfL -o flatc.zip \ + curl -sSfL -o "$RUNNER_TEMP/flatc.zip" \ "https://github.com/google/flatbuffers/releases/download/v${FLATC_VERSION}/Linux.flatc.binary.g++-13.zip" - unzip -q flatc.zip -d "$HOME/.flatc" + unzip -q "$RUNNER_TEMP/flatc.zip" -d "$HOME/.flatc" chmod +x "$HOME/.flatc/flatc" echo "$HOME/.flatc" >> "$GITHUB_PATH" @@ -180,11 +183,12 @@ jobs: exit 1 fi + # build.rs runs cargo fmt itself and panics if anything goes wrong, so a + # regeneration that cannot run fails here rather than reaching the + # comparison below having quietly changed nothing. - name: Regenerate Rust bindings working-directory: rust - run: | - FREENET_REGEN_FLATBUFFERS=1 cargo build - cargo fmt + run: FREENET_REGEN_FLATBUFFERS=1 cargo build - name: Regenerate TypeScript bindings working-directory: typescript @@ -196,13 +200,21 @@ jobs: # build regenerated only when a contributor happened to have flatc, and CI # never installed it, so a schema edit that was never regenerated compiled # and passed against bindings describing the previous schema. + # `git status --porcelain`, not `git diff --exit-code`: a new .fbs file + # generates entirely NEW binding files, which are untracked, and a plain + # diff reports a clean tree for them. That would let a schema merge with no + # committed bindings at all -- the loudest version of the drift this job + # exists to catch, sailing straight past it. - name: Fail if the committed bindings are stale run: | - if ! git diff --exit-code; then - echo >&2 + changes="$(git status --porcelain)" + if [ -n "$changes" ]; then echo "The committed flatbuffers bindings do not match the schemas." >&2 + echo >&2 + echo "$changes" >&2 + echo >&2 echo "Regenerate them and commit the result:" >&2 - echo " (cd rust && FREENET_REGEN_FLATBUFFERS=1 cargo build && cargo fmt)" >&2 + echo " (cd rust && FREENET_REGEN_FLATBUFFERS=1 cargo build)" >&2 echo " (cd typescript && npm run flatc-schemas)" >&2 echo "This needs flatc 24.3.25 specifically; another release reformats every file." >&2 exit 1 diff --git a/rust/build.rs b/rust/build.rs index 6e29e2a..6092e37 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -53,27 +53,27 @@ fn main() { return; } - // Note: `cargo:` directives are parsed from stdout only. A warning written - // to stderr renders nowhere, so every diagnostic here goes through - // `println!` — including the ones that read like errors. + // Everything below panics rather than warning. Setting the variable is an + // explicit request to regenerate, so a run that quietly regenerates nothing + // is the same silent-no-op this script exists to remove -- and it is worse + // here, because cargo caches a *successful* build-script run keyed on the + // declared inputs. A warn-and-return would be recorded as success, so + // installing the right compiler and re-running the documented command could + // legitimately not execute this script again, leaving the bindings stale + // while the developer believes they regenerated. Failing loudly is not + // cached and cannot be missed. match installed_flatc_version() { Some(version) if version == PINNED_FLATC => {} - Some(version) => { - println!( - "cargo:warning=FREENET_REGEN_FLATBUFFERS is set but flatc {version} is \ - installed; the bindings are pinned to {PINNED_FLATC}. Regenerating with a \ - different compiler rewrites every generated file. Skipping regeneration." - ); - return; - } - None => { - println!( - "cargo:warning=FREENET_REGEN_FLATBUFFERS is set but no flatc was found on \ - PATH. Install flatc {PINNED_FLATC} (https://github.com/google/flatbuffers). \ - Skipping regeneration." - ); - return; - } + Some(version) => panic!( + "FREENET_REGEN_FLATBUFFERS is set but flatc {version} is installed; the bindings \ + are pinned to {PINNED_FLATC}. Regenerating with a different compiler rewrites \ + every generated file. Install flatc {PINNED_FLATC} \ + (https://github.com/google/flatbuffers/releases/tag/v{PINNED_FLATC})." + ), + None => panic!( + "FREENET_REGEN_FLATBUFFERS is set but no flatc was found on PATH. Install flatc \ + {PINNED_FLATC} (https://github.com/google/flatbuffers/releases/tag/v{PINNED_FLATC})." + ), } let mut cmd = Command::new("flatc"); @@ -82,13 +82,17 @@ fn main() { cmd.arg(schema); } match cmd.status() { - Ok(status) if status.success() => { - // The checked-in bindings are formatted, so the regenerated ones - // must be too or the drift check compares formatting, not content. - let _ = Command::new("cargo").arg("fmt").status(); - } - Ok(status) => println!("cargo:warning=flatc exited with {status}"), - Err(err) => println!("cargo:warning=failed to run flatc: {err}"), + Ok(status) if status.success() => {} + Ok(status) => panic!("flatc exited with {status}"), + Err(err) => panic!("failed to run flatc: {err}"), + } + + // The checked-in bindings are formatted, so the regenerated ones must be too + // or the drift check compares formatting rather than content. + match Command::new("cargo").arg("fmt").status() { + Ok(status) if status.success() => {} + Ok(status) => panic!("cargo fmt exited with {status} after regenerating"), + Err(err) => panic!("failed to run cargo fmt after regenerating: {err}"), } } From a26a89a8c91dcdc79644d54fe8f46ac488945345 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Tue, 1 Sep 2026 09:36:53 -0500 Subject: [PATCH 4/9] build: fix always-dirty rerun-if-changed, re-pin to the runtime's flatc, harden the drift job Second review round. The first finding is a regression this PR introduced and is the reason for the round. **The rerun-if-changed paths made every downstream build recompile.** `cargo package` ships only files under `rust/`, so in a registry checkout `../schemas/` does not exist -- and cargo treats a rerun-if-changed path that does not exist as permanently dirty. Declaring the schemas unconditionally therefore rebuilt freenet-stdlib, and everything downstream of it, on every `cargo build`. Measured ~1s per no-op build for this crate alone before its reverse-dependency cone; freenet-core and River would both have paid it. The directives now come after the opt-in early return, so they are declared only from a source checkout where the path really exists. Verified by building twice with `schemas/` moved away: cached both times, no recompile. **Re-pinned 24.3.25 -> 24.12.23, because the stated reason for 24.3.25 was wrong.** The pin was justified as matching the crate, but `flatbuffers = "24.3"` is a caret range and the package actually resolves to 24.12.23; `Cargo.lock` is untracked, so nothing held it anywhere near 24.3. Upstream ships flatc and the crate from the same tag, so pairing them nine minor releases apart was not the coupling the comment claimed. The two compilers emit byte-identical output for these schemas -- checked directly -- so this changes no generated file and every earlier verification carries over: Rust bindings unchanged, TypeScript regeneration still a no-op, 56 tests still pass. What changes is that the comment is now true. The residual is documented rather than asserted away: the runtime still floats within 24.x and nothing detects it drifting from the pin. **The schema list is discovered, not hardcoded.** It was a fixed array of three while the TypeScript side globs the directory, so a new .fbs generated TypeScript bindings and no Rust ones -- and the drift job reported success having compared a file set that excluded it. **The drift job no longer trusts the build script to have run.** It deletes the generated bindings first, so a regeneration that quietly does nothing leaves deletions, which the staleness check sees. Previously a no-op left a clean tree that read as success, and that only did not happen because this is the one Rust job without a cargo cache -- an implicit property nothing enforced. Also: the flatc download is checksummed (a substituted release asset would self-report the expected version, pass the gate, and then dictate what this repo must commit); the version is read from build.rs instead of being a second copy that can drift; the redundant `npm install` is gone; and a schema newer than its bindings now produces a cargo warning, since opt-in regeneration otherwise fails silently for someone editing a schema locally. Corrected two claims rather than leaving them: the `wire_format_is_frozen` tests cited earlier are bincode freezes that never touch src/generated -- the tests that actually exercise the regenerated code are the `test_build_contract_*_from_fbs` decoders -- and this job is advisory until it is added to branch protection, which `main` does not currently require. [AI-assisted - Claude] --- .github/workflows/ci.yml | 49 ++++++++++++--- rust/build.rs | 129 +++++++++++++++++++++++++++++++-------- 2 files changed, 145 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8588c2c..8e9cf9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -157,32 +157,62 @@ jobs: node-version: '20' # Pinned deliberately. Different flatc releases format their output - # differently, so this job compares against one specific compiler; bump it - # and PINNED_FLATC in rust/build.rs together, in a commit that also - # regenerates. + # differently, so this job compares against one specific compiler. + # + # The version is read from build.rs rather than repeated here: two copies + # would let the compiler and the pin drift apart, which is the class of + # mistake this job exists to catch. + - name: Read pinned flatc version + id: flatc + run: | + version="$(grep -oP 'PINNED_FLATC: &str = "\K[^"]+' rust/build.rs)" + if [ -z "$version" ]; then + echo "could not read PINNED_FLATC from rust/build.rs" >&2 + exit 1 + fi + echo "version=$version" >> "$GITHUB_OUTPUT" + # Downloaded outside the checkout on purpose: anything left in the working # tree would show up as untracked, and the staleness check below treats # untracked files as drift. + # + # The checksum is not ceremony. Release assets can be replaced by anyone + # with upstream write access, and a substituted binary would self-report + # the expected version, pass the gate below, and then dictate what this + # repository is required to commit. - name: Install pinned flatc env: - FLATC_VERSION: 24.3.25 + FLATC_VERSION: ${{ steps.flatc.outputs.version }} + FLATC_SHA256: 9e3b46402076388e61ceeb07344e95a71b2c67fa54b861eaaef905bbe9311b86 run: | curl -sSfL -o "$RUNNER_TEMP/flatc.zip" \ "https://github.com/google/flatbuffers/releases/download/v${FLATC_VERSION}/Linux.flatc.binary.g++-13.zip" + echo "${FLATC_SHA256} $RUNNER_TEMP/flatc.zip" | sha256sum -c - unzip -q "$RUNNER_TEMP/flatc.zip" -d "$HOME/.flatc" chmod +x "$HOME/.flatc/flatc" echo "$HOME/.flatc" >> "$GITHUB_PATH" - name: Verify flatc version + env: + FLATC_VERSION: ${{ steps.flatc.outputs.version }} run: | # A silently-different compiler would make this whole job compare the # wrong thing and pass, which is the failure mode it exists to prevent. installed="$(flatc --version | awk '{print $NF}')" - if [ "$installed" != "24.3.25" ]; then - echo "expected flatc 24.3.25, got '$installed'" >&2 + if [ "$installed" != "$FLATC_VERSION" ]; then + echo "expected flatc $FLATC_VERSION, got '$installed'" >&2 exit 1 fi + # Deleting first makes a regeneration that quietly does nothing fail + # closed. Deletions of tracked files ARE visible to the staleness check + # below, whereas a no-op regeneration leaves a clean tree that reads as + # success. Without this the job's correctness rests on the build script + # actually executing, which today holds only because this is the one Rust + # job without a cargo cache -- an implicit property nothing enforces. + - name: Remove generated bindings so a no-op regeneration is visible + run: rm -f rust/src/generated/*_generated.rs + # build.rs runs cargo fmt itself and panics if anything goes wrong, so a # regeneration that cannot run fails here rather than reaching the # comparison below having quietly changed nothing. @@ -190,11 +220,12 @@ jobs: working-directory: rust run: FREENET_REGEN_FLATBUFFERS=1 cargo build + # No `npm install`: flatc-schemas only shells out to the flatc binary, so + # installing the package tree would add a minute and a network flake + # surface for nothing. - name: Regenerate TypeScript bindings working-directory: typescript - run: | - npm install - npm run flatc-schemas + run: npm run flatc-schemas # Until this job existed nothing compared the schemas to the bindings: the # build regenerated only when a contributor happened to have flatc, and CI diff --git a/rust/build.rs b/rust/build.rs index 6092e37..9a485cc 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -6,15 +6,16 @@ //! //! It used to work the other way: every build shelled out to whatever `flatc` //! happened to be on `PATH` and rewrote the bindings in place, silently doing -//! nothing at all when there was no `flatc` to find. Both halves of that caused -//! real problems. +//! nothing at all when there was no `flatc` to find. Both halves caused real +//! problems. //! //! Different `flatc` releases format their output differently, so a contributor //! whose compiler did not match the one the bindings were generated with got //! thousands of lines of unrelated churn mixed into their diff, on every build, //! whether or not they had touched a schema. That is not hypothetical: commit //! 8070e93, "revert: undo accidental flatbuffers regen from #72", exists because -//! it reached `main`. +//! it reached `main`. Worse, the rewrite also happened inside the crates.io +//! registry checkout on *downstream* builds, where nobody would ever see it. //! //! The silent fallback is the more dangerous half. CI does not install `flatc`, //! so CI never regenerated anything — it compiled the checked-in bindings and @@ -22,40 +23,61 @@ //! CI while the bindings on disk still described the *old* schema, and nothing //! anywhere compared the two. //! -//! So: regeneration is explicit, and `ci.yml`'s `flatbuffers-drift` job is what -//! actually enforces the relationship, by regenerating with the pinned compiler -//! and failing if the result differs from what is committed. +//! So: regeneration is explicit, and `ci.yml`'s `flatbuffers_drift` job is what +//! compares schemas to bindings, by regenerating with the pinned compiler and +//! failing if the result differs from what is committed. Note that job is only +//! advisory until it is added to branch protection — `main` currently requires +//! no status checks, so it reports drift rather than preventing it from merging. +use std::path::{Path, PathBuf}; use std::process::Command; -/// The `flatc` release whose output matches the checked-in bindings. +/// The `flatc` release the checked-in bindings are generated with. /// -/// Verified against both languages at the time of pinning: regenerating the -/// TypeScript bindings with this version is a no-op, and the Rust bindings it -/// produces pass the byte-frozen wire-format tests in `client_api::client_events` -/// unchanged. It also matches the `flatbuffers` crate version in `Cargo.toml`; -/// keep the two in step when either moves. -const PINNED_FLATC: &str = "24.3.25"; +/// Matches the `flatbuffers` runtime crate this package resolves to, which is +/// what makes the pairing meaningful: upstream ships `flatc` and the Rust crate +/// from the same tag. Note `Cargo.toml` declares `flatbuffers = "24.3"`, a caret +/// range rather than an exact version, and `Cargo.lock` is not tracked — so the +/// runtime floats within 24.x and can drift away from this pin without anything +/// noticing. Nothing here detects that; the drift job compares generated code to +/// the *schemas*, never to the runtime. +const PINNED_FLATC: &str = "24.12.23"; -const SCHEMAS: [&str; 3] = [ - "../schemas/flatbuffers/common.fbs", - "../schemas/flatbuffers/client_request.fbs", - "../schemas/flatbuffers/host_response.fbs", -]; +/// Where the `.fbs` files live, relative to this package. +/// +/// Outside the packaged crate on purpose — the schemas are shared with the +/// TypeScript SDK. That is why nothing below may reference this path during an +/// ordinary build; see `main`. +const SCHEMA_DIR: &str = "../schemas/flatbuffers"; fn main() { + // Deliberately the ONLY directive emitted on the ordinary build path, and + // deliberately not a `rerun-if-changed` on the schemas. + // + // `cargo package` ships only files under `rust/`, so in a registry checkout + // `../schemas/` does not exist — and cargo treats a `rerun-if-changed` path + // that does not exist as permanently dirty. Declaring the schemas here would + // therefore rebuild `freenet-stdlib`, and everything downstream of it, on + // every single `cargo build` in every consumer. Measured at ~1s per no-op + // build for this crate alone, before its reverse-dependency cone. println!("cargo:rerun-if-env-changed=FREENET_REGEN_FLATBUFFERS"); - for schema in SCHEMAS { - println!("cargo:rerun-if-changed={schema}"); - } if std::env::var_os("FREENET_REGEN_FLATBUFFERS").is_none() { + warn_if_schemas_look_newer(); return; } + let schemas = schema_files(); + + // Safe here: regeneration is only ever requested from a source checkout, so + // the directory exists and the always-dirty problem above does not apply. + for schema in &schemas { + println!("cargo:rerun-if-changed={}", schema.display()); + } + // Everything below panics rather than warning. Setting the variable is an // explicit request to regenerate, so a run that quietly regenerates nothing - // is the same silent-no-op this script exists to remove -- and it is worse + // is the same silent no-op this script exists to remove -- and it is worse // here, because cargo caches a *successful* build-script run keyed on the // declared inputs. A warn-and-return would be recorded as success, so // installing the right compiler and re-running the documented command could @@ -78,7 +100,7 @@ fn main() { let mut cmd = Command::new("flatc"); cmd.arg("--rust").arg("-o").arg("src/generated"); - for schema in SCHEMAS { + for schema in &schemas { cmd.arg(schema); } match cmd.status() { @@ -96,9 +118,68 @@ fn main() { } } +/// Every `.fbs` in [`SCHEMA_DIR`], sorted so the flatc invocation is stable. +/// +/// Discovered rather than listed. The TypeScript side globs the same directory, +/// so a hardcoded list here would silently cover one language and not the other: +/// a new schema would generate TypeScript bindings and no Rust ones, and the +/// drift job would report success having compared a file set that did not +/// include it. +fn schema_files() -> Vec { + let dir = Path::new(SCHEMA_DIR); + let mut files: Vec = std::fs::read_dir(dir) + .unwrap_or_else(|err| panic!("cannot read {SCHEMA_DIR}: {err}")) + .filter_map(|entry| entry.ok().map(|e| e.path())) + .filter(|path| path.extension().is_some_and(|ext| ext == "fbs")) + .collect(); + if files.is_empty() { + panic!("no .fbs schemas found in {SCHEMA_DIR}"); + } + files.sort(); + files +} + +/// Best-effort nudge when a schema looks newer than the bindings built from it. +/// +/// Regeneration is opt-in, which means the failure mode for someone editing a +/// schema locally is that their new field simply does not exist and the compile +/// error says nothing about flatbuffers. This is the one moment the build script +/// runs with a chance to say so. Advisory only, and mtime-based, so it stays a +/// warning and never a hard failure. +fn warn_if_schemas_look_newer() { + let Ok(entries) = std::fs::read_dir(SCHEMA_DIR) else { + return; + }; + let newest_generated = std::fs::read_dir("src/generated") + .into_iter() + .flatten() + .filter_map(|e| e.ok()?.metadata().ok()?.modified().ok()) + .max(); + let Some(newest_generated) = newest_generated else { + return; + }; + for entry in entries.filter_map(|e| e.ok()) { + let path = entry.path(); + if path.extension().is_none_or(|ext| ext != "fbs") { + continue; + } + let Ok(modified) = entry.metadata().and_then(|m| m.modified()) else { + continue; + }; + if modified > newest_generated { + println!( + "cargo:warning={} is newer than the generated bindings. If you edited it, \ + regenerate with: FREENET_REGEN_FLATBUFFERS=1 cargo build (needs flatc \ + {PINNED_FLATC}), and in typescript/: npm run flatc-schemas", + path.display() + ); + } + } +} + /// The `x.y.z` of the `flatc` on `PATH`, or `None` when it cannot be run. /// -/// `flatc --version` prints a line like `flatc version 24.3.25`; the version is +/// `flatc --version` prints a line like `flatc version 24.12.23`; the version is /// the last whitespace-separated token. fn installed_flatc_version() -> Option { let out = Command::new("flatc").arg("--version").output().ok()?; From fa95297f91beb31f078e8d09a45fa0d97f771cf9 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Tue, 1 Sep 2026 09:41:20 -0500 Subject: [PATCH 5/9] fix(build): avoid Option::is_none_or, which post-dates the crate MSRV CI clippy caught it: `is_none_or` is stable since 1.82 while Cargo.toml declares `rust-version = "1.80"`, so the `incompatible_msrv` lint failed the build script on both clippy targets. Replaced with `matches!`, which needs nothing newer than the MSRV. My earlier local clippy run predated this code -- I rewrote build.rs afterwards and did not re-run it. Re-run and clean now. [AI-assisted - Claude] --- rust/build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rust/build.rs b/rust/build.rs index 9a485cc..88e7552 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -160,7 +160,9 @@ fn warn_if_schemas_look_newer() { }; for entry in entries.filter_map(|e| e.ok()) { let path = entry.path(); - if path.extension().is_none_or(|ext| ext != "fbs") { + // `matches!` rather than `Option::is_none_or`, which is stable only + // since 1.82 while this crate's MSRV is 1.80. + if !matches!(path.extension(), Some(ext) if ext == "fbs") { continue; } let Ok(modified) = entry.metadata().and_then(|m| m.modified()) else { From 0e9f0c62bd8f04ab5bddbb1f9cf80bf801566017 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Tue, 1 Sep 2026 20:45:41 -0500 Subject: [PATCH 6/9] build: make the stale-schema warning able to fire, and stop the CI advice naming the old pin Both from external re-review. The stale-schema warning could never fire. After one ordinary build cargo had recorded only `rerun-if-env-changed`, so editing a schema did not re-run the build script at all -- the warning was unreachable in exactly the situation it was added for. A check that cannot go off is worse than no check, because it reads as coverage. The previous commit had removed the path directives wholesale to fix the always-dirty downstream rebuild, which overcorrected: declaring paths that do not exist makes cargo rebuild forever, and declaring nothing makes it never re-run. The condition that separates those is whether the schema directory is actually there, so that is now the condition. A source checkout declares the schemas it can see; a published crate declares none and falls back to cargo's default heuristic, which caches correctly. `discover_schemas` returns None instead of panicking on a missing directory for the same reason -- it runs on every downstream build, where a panic would be far worse than the problem it reports. Verified all three ways: the warning now fires on a touched schema and names the right compiler; two consecutive in-repo builds still cache; and with schemas/ moved away, two consecutive builds cache with no recompile. The drift job's failure advice still said flatc 24.3.25 after the pin moved to 24.12.23, so a contributor following it would install a compiler the build script now rejects. It reads the version from the same step output as the install rather than repeating it. [AI-assisted - Claude] --- .github/workflows/ci.yml | 8 +++++- rust/build.rs | 58 +++++++++++++++++++++++++--------------- 2 files changed, 43 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e9cf9f..203d093 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -236,7 +236,13 @@ jobs: # diff reports a clean tree for them. That would let a schema merge with no # committed bindings at all -- the loudest version of the drift this job # exists to catch, sailing straight past it. + # The version in the remediation comes from the same step output as the + # install, not a literal: a hardcoded one silently rots when the pin moves, + # and the advice then tells contributors to install a compiler the build + # script explicitly rejects. - name: Fail if the committed bindings are stale + env: + FLATC_VERSION: ${{ steps.flatc.outputs.version }} run: | changes="$(git status --porcelain)" if [ -n "$changes" ]; then @@ -247,7 +253,7 @@ jobs: echo "Regenerate them and commit the result:" >&2 echo " (cd rust && FREENET_REGEN_FLATBUFFERS=1 cargo build)" >&2 echo " (cd typescript && npm run flatc-schemas)" >&2 - echo "This needs flatc 24.3.25 specifically; another release reformats every file." >&2 + echo "This needs flatc $FLATC_VERSION specifically; another release reformats every file." >&2 exit 1 fi diff --git a/rust/build.rs b/rust/build.rs index 88e7552..ec52a0f 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -51,28 +51,41 @@ const PINNED_FLATC: &str = "24.12.23"; const SCHEMA_DIR: &str = "../schemas/flatbuffers"; fn main() { - // Deliberately the ONLY directive emitted on the ordinary build path, and - // deliberately not a `rerun-if-changed` on the schemas. + println!("cargo:rerun-if-env-changed=FREENET_REGEN_FLATBUFFERS"); + + // Declared only when the schemas are actually present, and that condition + // is the whole point. // // `cargo package` ships only files under `rust/`, so in a registry checkout // `../schemas/` does not exist — and cargo treats a `rerun-if-changed` path - // that does not exist as permanently dirty. Declaring the schemas here would - // therefore rebuild `freenet-stdlib`, and everything downstream of it, on - // every single `cargo build` in every consumer. Measured at ~1s per no-op - // build for this crate alone, before its reverse-dependency cone. - println!("cargo:rerun-if-env-changed=FREENET_REGEN_FLATBUFFERS"); + // that does not exist as permanently dirty. Declaring them unconditionally + // rebuilt `freenet-stdlib`, and everything downstream of it, on every single + // `cargo build` in every consumer (~1s per no-op build for this crate alone, + // before its reverse-dependency cone). + // + // Declaring nothing at all is equally wrong in the other direction: cargo + // then re-runs this script only when the env var changes, so editing a + // schema would not re-run it, and the stale-schema warning below could never + // fire in the one situation it exists for. Existing paths get the directive; + // a checkout without them falls back to cargo's default "any packaged file" + // heuristic, which caches correctly. + let schemas = discover_schemas(); + if let Some(schemas) = &schemas { + for schema in schemas { + println!("cargo:rerun-if-changed={}", schema.display()); + } + } if std::env::var_os("FREENET_REGEN_FLATBUFFERS").is_none() { warn_if_schemas_look_newer(); return; } - let schemas = schema_files(); - - // Safe here: regeneration is only ever requested from a source checkout, so - // the directory exists and the always-dirty problem above does not apply. - for schema in &schemas { - println!("cargo:rerun-if-changed={}", schema.display()); + let schemas = schemas.unwrap_or_else(|| { + panic!("FREENET_REGEN_FLATBUFFERS is set but {SCHEMA_DIR} does not exist") + }); + if schemas.is_empty() { + panic!("no .fbs schemas found in {SCHEMA_DIR}"); } // Everything below panics rather than warning. Setting the variable is an @@ -118,25 +131,26 @@ fn main() { } } -/// Every `.fbs` in [`SCHEMA_DIR`], sorted so the flatc invocation is stable. +/// Every `.fbs` in [`SCHEMA_DIR`], sorted so the flatc invocation is stable, or +/// `None` when the directory is not there at all. /// /// Discovered rather than listed. The TypeScript side globs the same directory, /// so a hardcoded list here would silently cover one language and not the other: /// a new schema would generate TypeScript bindings and no Rust ones, and the /// drift job would report success having compared a file set that did not /// include it. -fn schema_files() -> Vec { - let dir = Path::new(SCHEMA_DIR); - let mut files: Vec = std::fs::read_dir(dir) - .unwrap_or_else(|err| panic!("cannot read {SCHEMA_DIR}: {err}")) +/// +/// Returns `None` rather than panicking on a missing directory because that is +/// the normal state of a published crate — this runs on every downstream build, +/// where a panic would be far worse than the problem it reports. +fn discover_schemas() -> Option> { + let mut files: Vec = std::fs::read_dir(Path::new(SCHEMA_DIR)) + .ok()? .filter_map(|entry| entry.ok().map(|e| e.path())) .filter(|path| path.extension().is_some_and(|ext| ext == "fbs")) .collect(); - if files.is_empty() { - panic!("no .fbs schemas found in {SCHEMA_DIR}"); - } files.sort(); - files + Some(files) } /// Best-effort nudge when a schema looks newer than the bindings built from it. From aec786d53d729832a73ec3eaa17df2e17f503e86 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Tue, 1 Sep 2026 20:55:29 -0500 Subject: [PATCH 7/9] build: fingerprint schema content instead of comparing mtimes, and drop an orphaned binding From the re-review, and the first item is a defect in the check this PR added rather than in the code it guards. `warn_if_schemas_look_newer` fired on every fresh clone. Git writes checkout files in path order, so `rust/src/generated/` lands before `schemas/`, making every schema strictly newer than every binding the moment a contributor clones. It emitted fifteen warnings across five jobs in this PR's own green CI run -- the same run where the drift job proved the bindings matched the schemas exactly. A warning that is already going off is not a warning: by the time it was true, nobody could have told it apart from the noise, which is the same "signal that cannot fail" the rest of this PR exists to remove. It now compares CONTENT. The regeneration path records an FNV-1a fingerprint of the schema bytes next to the bindings, and an ordinary build warns only when the current schemas hash differently. Verified both directions: touching a schema without editing it (the fresh-clone case) produces no warning, and appending a line to one does. Deliberately not DefaultHasher, whose output is not stable across Rust releases -- that would have swapped a false positive keyed on clone order for one keyed on the contributor's toolchain. Also removes typescript/src/host-response/application-message.ts, an orphan from when ApplicationMessage moved to common.fbs. Nothing imports it -- every reference resolves to common/application-message.js -- and flatc no longer emits it, which is exactly why the drift job could not see it: a generated file for a table that no longer exists is never regenerated, never modified, and so never shows up as drift. The general gap remains for the TypeScript side, which has no equivalent of the delete-before-regenerate step the Rust side uses. Corrected a comment the review disproved: emitting any directive opts out of cargo's default packaged-file scan, so a checkout without the schemas re-runs only on the env var rather than falling back to that scan. Right for a registry checkout, whose sources cannot change, but not what the comment claimed. [AI-assisted - Claude] --- rust/build.rs | 103 +++++++---- rust/src/generated/.schema-fingerprint | 1 + .../src/host-response/application-message.ts | 168 ------------------ 3 files changed, 72 insertions(+), 200 deletions(-) create mode 100644 rust/src/generated/.schema-fingerprint delete mode 100644 typescript/src/host-response/application-message.ts diff --git a/rust/build.rs b/rust/build.rs index ec52a0f..56ec619 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -50,6 +50,14 @@ const PINNED_FLATC: &str = "24.12.23"; /// ordinary build; see `main`. const SCHEMA_DIR: &str = "../schemas/flatbuffers"; +/// Records the schema content the committed bindings were generated from. +/// +/// Written by the regeneration path and committed alongside the bindings, so an +/// ordinary build can tell whether the two still correspond without needing +/// flatc. The drift job regenerates it like everything else, so a stale one is +/// itself caught as drift. +const SCHEMA_FINGERPRINT: &str = "src/generated/.schema-fingerprint"; + fn main() { println!("cargo:rerun-if-env-changed=FREENET_REGEN_FLATBUFFERS"); @@ -66,9 +74,13 @@ fn main() { // Declaring nothing at all is equally wrong in the other direction: cargo // then re-runs this script only when the env var changes, so editing a // schema would not re-run it, and the stale-schema warning below could never - // fire in the one situation it exists for. Existing paths get the directive; - // a checkout without them falls back to cargo's default "any packaged file" - // heuristic, which caches correctly. + // fire in the one situation it exists for. + // + // So existing paths get the directive. Where they are absent no path + // directive is emitted, and since `rerun-if-env-changed` above is + // unconditional the script has still opted out of cargo's default + // "any packaged file" scan — it re-runs only on the env var. That is right + // for a registry checkout, whose sources cannot change anyway. let schemas = discover_schemas(); if let Some(schemas) = &schemas { for schema in schemas { @@ -77,7 +89,7 @@ fn main() { } if std::env::var_os("FREENET_REGEN_FLATBUFFERS").is_none() { - warn_if_schemas_look_newer(); + warn_if_schemas_stale(); return; } @@ -129,6 +141,14 @@ fn main() { Ok(status) => panic!("cargo fmt exited with {status} after regenerating"), Err(err) => panic!("failed to run cargo fmt after regenerating: {err}"), } + + // Last, so it records only schemas that actually made it through. + let Some(fingerprint) = fingerprint(&schemas) else { + panic!("could not read the schemas to fingerprint them"); + }; + if let Err(err) = std::fs::write(SCHEMA_FINGERPRINT, format!("{fingerprint}\n")) { + panic!("failed to write {SCHEMA_FINGERPRINT}: {err}"); + } } /// Every `.fbs` in [`SCHEMA_DIR`], sorted so the flatc invocation is stable, or @@ -153,44 +173,63 @@ fn discover_schemas() -> Option> { Some(files) } -/// Best-effort nudge when a schema looks newer than the bindings built from it. +/// Nudge when the schemas no longer match the bindings built from them. /// /// Regeneration is opt-in, which means the failure mode for someone editing a /// schema locally is that their new field simply does not exist and the compile /// error says nothing about flatbuffers. This is the one moment the build script -/// runs with a chance to say so. Advisory only, and mtime-based, so it stays a -/// warning and never a hard failure. -fn warn_if_schemas_look_newer() { - let Ok(entries) = std::fs::read_dir(SCHEMA_DIR) else { +/// runs with a chance to say so. Advisory only: it warns and never fails. +/// +/// Compares CONTENT, not timestamps. An earlier version of this compared +/// schema mtimes against the generated files and fired on every fresh clone, +/// because git writes checkout files in path order — `rust/src/generated/` +/// sorts before `schemas/`, so every schema was always strictly newer. It +/// emitted fifteen warnings across five jobs in a CI run where the drift job +/// simultaneously proved the bindings matched exactly. A warning that is +/// already going off is not a warning; by the time it was true nobody would +/// have been able to tell it apart from the noise. +fn warn_if_schemas_stale() { + let Some(schemas) = discover_schemas() else { return; }; - let newest_generated = std::fs::read_dir("src/generated") - .into_iter() - .flatten() - .filter_map(|e| e.ok()?.metadata().ok()?.modified().ok()) - .max(); - let Some(newest_generated) = newest_generated else { + let Some(current) = fingerprint(&schemas) else { return; }; - for entry in entries.filter_map(|e| e.ok()) { - let path = entry.path(); - // `matches!` rather than `Option::is_none_or`, which is stable only - // since 1.82 while this crate's MSRV is 1.80. - if !matches!(path.extension(), Some(ext) if ext == "fbs") { - continue; - } - let Ok(modified) = entry.metadata().and_then(|m| m.modified()) else { - continue; - }; - if modified > newest_generated { - println!( - "cargo:warning={} is newer than the generated bindings. If you edited it, \ - regenerate with: FREENET_REGEN_FLATBUFFERS=1 cargo build (needs flatc \ - {PINNED_FLATC}), and in typescript/: npm run flatc-schemas", - path.display() - ); + // Absent on a checkout predating the fingerprint; silence beats nagging + // about something the developer cannot act on. + let Ok(recorded) = std::fs::read_to_string(SCHEMA_FINGERPRINT) else { + return; + }; + if recorded.trim() != current { + println!( + "cargo:warning=the flatbuffers schemas do not match the committed bindings. \ + If you edited a schema, regenerate with: FREENET_REGEN_FLATBUFFERS=1 cargo \ + build (needs flatc {PINNED_FLATC}), and in typescript/: npm run flatc-schemas" + ); + } +} + +/// A content fingerprint of `schemas`, or `None` if any cannot be read. +/// +/// FNV-1a over each file's name and bytes, in the sorted order +/// [`discover_schemas`] returns. Hand-rolled rather than pulled from a crate +/// because a build dependency for this would be absurd, and deliberately not +/// `DefaultHasher`, whose output is explicitly not stable across Rust releases +/// — that would reintroduce the false positive this replaced, keyed on the +/// contributor's toolchain instead of their clone order. +fn fingerprint(schemas: &[PathBuf]) -> Option { + let mut hash: u64 = 0xcbf2_9ce4_8422_2325; + let mut eat = |bytes: &[u8]| { + for byte in bytes { + hash ^= u64::from(*byte); + hash = hash.wrapping_mul(0x100_0000_01b3); } + }; + for schema in schemas { + eat(schema.file_name()?.to_str()?.as_bytes()); + eat(&std::fs::read(schema).ok()?); } + Some(format!("{hash:016x}")) } /// The `x.y.z` of the `flatc` on `PATH`, or `None` when it cannot be run. diff --git a/rust/src/generated/.schema-fingerprint b/rust/src/generated/.schema-fingerprint new file mode 100644 index 0000000..6dd6703 --- /dev/null +++ b/rust/src/generated/.schema-fingerprint @@ -0,0 +1 @@ +e2304c389b43e336 diff --git a/typescript/src/host-response/application-message.ts b/typescript/src/host-response/application-message.ts deleted file mode 100644 index 833626f..0000000 --- a/typescript/src/host-response/application-message.ts +++ /dev/null @@ -1,168 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ - -import * as flatbuffers from 'flatbuffers'; - -import { ContractInstanceId, ContractInstanceIdT } from '../common/contract-instance-id.js'; - - -export class ApplicationMessage implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):ApplicationMessage { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsApplicationMessage(bb:flatbuffers.ByteBuffer, obj?:ApplicationMessage):ApplicationMessage { - return (obj || new ApplicationMessage()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsApplicationMessage(bb:flatbuffers.ByteBuffer, obj?:ApplicationMessage):ApplicationMessage { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ApplicationMessage()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -app(obj?:ContractInstanceId):ContractInstanceId|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new ContractInstanceId()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -payload(index: number):number|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint8(this.bb!.__vector(this.bb_pos + offset) + index) : 0; -} - -payloadLength():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -payloadArray():Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? new Uint8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null; -} - -delegateContext(index: number):number|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readUint8(this.bb!.__vector(this.bb_pos + offset) + index) : 0; -} - -delegateContextLength():number { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -delegateContextArray():Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? new Uint8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null; -} - -processed():boolean { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startApplicationMessage(builder:flatbuffers.Builder) { - builder.startObject(4); -} - -static addApp(builder:flatbuffers.Builder, appOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, appOffset, 0); -} - -static addPayload(builder:flatbuffers.Builder, payloadOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, payloadOffset, 0); -} - -static createPayloadVector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset { - builder.startVector(1, data.length, 1); - for (let i = data.length - 1; i >= 0; i--) { - builder.addInt8(data[i]!); - } - return builder.endVector(); -} - -static startPayloadVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(1, numElems, 1); -} - -static addDelegateContext(builder:flatbuffers.Builder, delegateContextOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, delegateContextOffset, 0); -} - -static createDelegateContextVector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset { - builder.startVector(1, data.length, 1); - for (let i = data.length - 1; i >= 0; i--) { - builder.addInt8(data[i]!); - } - return builder.endVector(); -} - -static startDelegateContextVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(1, numElems, 1); -} - -static addProcessed(builder:flatbuffers.Builder, processed:boolean) { - builder.addFieldInt8(3, +processed, +false); -} - -static endApplicationMessage(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - builder.requiredField(offset, 4) // app - builder.requiredField(offset, 6) // payload - builder.requiredField(offset, 8) // delegate_context - return offset; -} - -static createApplicationMessage(builder:flatbuffers.Builder, appOffset:flatbuffers.Offset, payloadOffset:flatbuffers.Offset, delegateContextOffset:flatbuffers.Offset, processed:boolean):flatbuffers.Offset { - ApplicationMessage.startApplicationMessage(builder); - ApplicationMessage.addApp(builder, appOffset); - ApplicationMessage.addPayload(builder, payloadOffset); - ApplicationMessage.addDelegateContext(builder, delegateContextOffset); - ApplicationMessage.addProcessed(builder, processed); - return ApplicationMessage.endApplicationMessage(builder); -} - -unpack(): ApplicationMessageT { - return new ApplicationMessageT( - (this.app() !== null ? this.app()!.unpack() : null), - this.bb!.createScalarList(this.payload.bind(this), this.payloadLength()), - this.bb!.createScalarList(this.delegateContext.bind(this), this.delegateContextLength()), - this.processed() - ); -} - - -unpackTo(_o: ApplicationMessageT): void { - _o.app = (this.app() !== null ? this.app()!.unpack() : null); - _o.payload = this.bb!.createScalarList(this.payload.bind(this), this.payloadLength()); - _o.delegateContext = this.bb!.createScalarList(this.delegateContext.bind(this), this.delegateContextLength()); - _o.processed = this.processed(); -} -} - -export class ApplicationMessageT implements flatbuffers.IGeneratedObject { -constructor( - public app: ContractInstanceIdT|null = null, - public payload: (number)[] = [], - public delegateContext: (number)[] = [], - public processed: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const app = (this.app !== null ? this.app!.pack(builder) : 0); - const payload = ApplicationMessage.createPayloadVector(builder, this.payload); - const delegateContext = ApplicationMessage.createDelegateContextVector(builder, this.delegateContext); - - return ApplicationMessage.createApplicationMessage(builder, - app, - payload, - delegateContext, - this.processed - ); -} -} From 2711c988cefc97fe1e1a0d336412e30ac6c80197 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Tue, 1 Sep 2026 21:02:42 -0500 Subject: [PATCH 8/9] build: catch orphaned TypeScript bindings and newly added schemas Two more from external review, both cases where drift stays invisible. **Orphans.** When a table is deleted, renamed, or moves namespace, flatc stops emitting its old .ts file but does not remove it. Regenerating in place leaves that tracked file untouched, so it is never modified and the tree reads clean -- the drift gate approves bindings that no longer match the schemas. The orphan removed in the previous commit is exactly this shape and sat green through several runs of the new job. The TypeScript half now gets the same delete-before-regenerate treatment as the Rust half, keyed on flatc's own header comment. That marker is what makes deletion-by-pattern safe rather than reckless: all 71 generated files carry it and none of the hand-written sources in typescript/src do (index.ts, streaming.ts, websocket-interface.ts all verified clean). An orphan therefore stays deleted through regeneration and surfaces as drift. **Added schemas.** Watching only the individual schema files gave cargo no input that changes when a schema is ADDED, so on an already-built checkout the script would not re-run: no stale-schema warning, and a regeneration already enabled could stay cached and silently omit the new binding. Watching the directory too closes that, and stays inside the only-when-present rule that keeps downstream builds cached. Verified the full CI sequence locally in both languages: deleting all 71 generated TypeScript files and all three Rust ones, then regenerating, returns a byte-clean tree. Caching re-checked after adding the directory watch -- two consecutive builds cache in-repo, and still cache with schemas/ moved away. [AI-assisted - Claude] --- .github/workflows/ci.yml | 13 ++++++++++++- rust/build.rs | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 203d093..51fa30b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -210,8 +210,19 @@ jobs: # success. Without this the job's correctness rests on the build script # actually executing, which today holds only because this is the one Rust # job without a cargo cache -- an implicit property nothing enforces. + # + # The TypeScript half also catches ORPHANS, which nothing else can see. + # When a table is deleted, renamed, or moves namespace, flatc stops + # emitting its old .ts file but does not remove it, so the stale file is + # never regenerated, never modified, and reads as a clean tree. Deleting + # every file carrying flatc's own header first means an orphan stays + # deleted and shows up as drift. The marker is what makes this safe to do + # by pattern: the hand-written sources in typescript/src do not carry it. - name: Remove generated bindings so a no-op regeneration is visible - run: rm -f rust/src/generated/*_generated.rs + run: | + rm -f rust/src/generated/*_generated.rs + grep -rl "automatically generated by the FlatBuffers compiler" typescript/src \ + | xargs -r rm -f # build.rs runs cargo fmt itself and panics if anything goes wrong, so a # regeneration that cannot run fails here rather than reaching the diff --git a/rust/build.rs b/rust/build.rs index 56ec619..e62ca30 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -83,6 +83,12 @@ fn main() { // for a registry checkout, whose sources cannot change anyway. let schemas = discover_schemas(); if let Some(schemas) = &schemas { + // The directory as well as the files in it. Watching only the files + // means cargo has no input that changes when a schema is ADDED, so on an + // already-built checkout the script would not re-run: no stale-schema + // warning, and a regeneration that was already enabled could stay cached + // and silently omit the new binding. + println!("cargo:rerun-if-changed={SCHEMA_DIR}"); for schema in schemas { println!("cargo:rerun-if-changed={}", schema.display()); } From f64109a1e8b6d55024885cbf9aaa7d3816e59672 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Tue, 1 Sep 2026 21:05:37 -0500 Subject: [PATCH 9/9] build: close out the remaining low-severity review findings Small, and none of them a correctness risk -- recorded so the review is addressed rather than cherry-picked. The flatc-version step's friendly error was unreachable: GitHub Actions runs `bash -e`, so a failed grep aborted the step before the message could explain itself. It failed closed either way; now it also says why. The download checksum is the one value that cannot follow PINNED_FLATC automatically, since it has to be pinned by hand. Moving the pin without it fails with "computed checksum did NOT match", which reads as a supply-chain alarm rather than a forgotten hash, so the coupling is now stated at the call site along with the fact that the asset filename is not stable across flatc releases either. The TypeScript glob was `../schemas/flatbuffers/*` while the Rust side filters on `.fbs`, so a README dropped in that directory would break TypeScript generation and not Rust. Both now agree on `*.fbs`. Verified the narrowed glob regenerates byte-identical output. Not fixed, deliberately: flatc is pinned exactly while rustfmt is not, and build.rs shells to `cargo fmt` after regenerating -- so a contributor regenerating on a different toolchain could produce formatting the drift job rejects while blaming flatc. The fix is a repo-wide rust-toolchain.toml pinning the formatter for every contributor and every job, which is a larger decision than this PR should make on its own. Worth doing; worth doing deliberately. [AI-assisted - Claude] --- .github/workflows/ci.yml | 13 ++++++++++++- typescript/package.json | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51fa30b..3368700 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,9 +165,13 @@ jobs: - name: Read pinned flatc version id: flatc run: | - version="$(grep -oP 'PINNED_FLATC: &str = "\K[^"]+' rust/build.rs)" + # `|| true` so a failed grep does not abort the step under `bash -e` + # before the message below can explain what went wrong. It fails + # closed either way; this makes the failure legible. + version="$(grep -oP 'PINNED_FLATC: &str = "\K[^"]+' rust/build.rs || true)" if [ -z "$version" ]; then echo "could not read PINNED_FLATC from rust/build.rs" >&2 + echo "(has the declaration been reformatted?)" >&2 exit 1 fi echo "version=$version" >> "$GITHUB_OUTPUT" @@ -180,6 +184,13 @@ jobs: # with upstream write access, and a substituted binary would self-report # the expected version, pass the gate below, and then dictate what this # repository is required to commit. + # + # It is necessarily pinned by hand, so it is the one value that does NOT + # follow PINNED_FLATC automatically: moving the pin without updating this + # fails with "computed checksum did NOT match", which reads as a + # supply-chain alarm rather than "you forgot the hash". Update both + # together. The asset filename is likewise not stable across flatc + # releases and may need revisiting on a bump. - name: Install pinned flatc env: FLATC_VERSION: ${{ steps.flatc.outputs.version }} diff --git a/typescript/package.json b/typescript/package.json index 1f28e8c..3fb26d8 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -49,7 +49,7 @@ "build": "tsc", "prod.package": "./package.prod.sh", "dev.package": "./package.dev.sh dev", - "flatc-schemas": "bash -c \"flatc --ts --gen-object-api -o ./src ../schemas/flatbuffers/*\"" + "flatc-schemas": "bash -c \"flatc --ts --gen-object-api -o ./src ../schemas/flatbuffers/*.fbs\"" }, "license": "MIT+APACHE-2.0", "homepage": "https://github.com/freenet/freenet-stdlib",