Skip to content

Commit f535594

Browse files
committed
Regenerate FlatBuffer generated code
Update all generated Rust code based on the new schema definitions. This includes new types for error handling and result structures. Signed-off-by: Ludvig Liljenberg <[email protected]>
1 parent f12e463 commit f535594

File tree

8 files changed

+620
-687
lines changed

8 files changed

+620
-687
lines changed

src/hyperlight_common/src/flatbuffers/hyperlight/generated/error_code_generated.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ pub const ENUM_MIN_ERROR_CODE: u64 = 0;
1919
since = "2.0.0",
2020
note = "Use associated constants instead. This will no longer be generated in 2021."
2121
)]
22-
pub const ENUM_MAX_ERROR_CODE: u64 = 16;
22+
pub const ENUM_MAX_ERROR_CODE: u64 = 17;
2323
#[deprecated(
2424
since = "2.0.0",
2525
note = "Use associated constants instead. This will no longer be generated in 2021."
2626
)]
2727
#[allow(non_camel_case_types)]
28-
pub const ENUM_VALUES_ERROR_CODE: [ErrorCode; 16] = [
28+
pub const ENUM_VALUES_ERROR_CODE: [ErrorCode; 17] = [
2929
ErrorCode::NoError,
3030
ErrorCode::UnsupportedParameterType,
3131
ErrorCode::GuestFunctionNameNotProvided,
@@ -42,6 +42,7 @@ pub const ENUM_VALUES_ERROR_CODE: [ErrorCode; 16] = [
4242
ErrorCode::GuestFunctionParameterTypeMismatch,
4343
ErrorCode::GuestError,
4444
ErrorCode::ArrayLengthParamIsMissing,
45+
ErrorCode::HostError,
4546
];
4647

4748
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
@@ -65,9 +66,10 @@ impl ErrorCode {
6566
pub const GuestFunctionParameterTypeMismatch: Self = Self(14);
6667
pub const GuestError: Self = Self(15);
6768
pub const ArrayLengthParamIsMissing: Self = Self(16);
69+
pub const HostError: Self = Self(17);
6870

6971
pub const ENUM_MIN: u64 = 0;
70-
pub const ENUM_MAX: u64 = 16;
72+
pub const ENUM_MAX: u64 = 17;
7173
pub const ENUM_VALUES: &'static [Self] = &[
7274
Self::NoError,
7375
Self::UnsupportedParameterType,
@@ -85,6 +87,7 @@ impl ErrorCode {
8587
Self::GuestFunctionParameterTypeMismatch,
8688
Self::GuestError,
8789
Self::ArrayLengthParamIsMissing,
90+
Self::HostError,
8891
];
8992
/// Returns the variant's name or "" if unknown.
9093
pub fn variant_name(self) -> Option<&'static str> {
@@ -107,6 +110,7 @@ impl ErrorCode {
107110
Self::GuestFunctionParameterTypeMismatch => Some("GuestFunctionParameterTypeMismatch"),
108111
Self::GuestError => Some("GuestError"),
109112
Self::ArrayLengthParamIsMissing => Some("ArrayLengthParamIsMissing"),
113+
Self::HostError => Some("HostError"),
110114
_ => None,
111115
}
112116
}

src/hyperlight_common/src/flatbuffers/hyperlight/generated/function_call_generated.rs

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -237,80 +237,3 @@ impl core::fmt::Debug for FunctionCall<'_> {
237237
ds.finish()
238238
}
239239
}
240-
#[inline]
241-
/// Verifies that a buffer of bytes contains a `FunctionCall`
242-
/// and returns it.
243-
/// Note that verification is still experimental and may not
244-
/// catch every error, or be maximally performant. For the
245-
/// previous, unchecked, behavior use
246-
/// `root_as_function_call_unchecked`.
247-
pub fn root_as_function_call(buf: &[u8]) -> Result<FunctionCall, flatbuffers::InvalidFlatbuffer> {
248-
flatbuffers::root::<FunctionCall>(buf)
249-
}
250-
#[inline]
251-
/// Verifies that a buffer of bytes contains a size prefixed
252-
/// `FunctionCall` and returns it.
253-
/// Note that verification is still experimental and may not
254-
/// catch every error, or be maximally performant. For the
255-
/// previous, unchecked, behavior use
256-
/// `size_prefixed_root_as_function_call_unchecked`.
257-
pub fn size_prefixed_root_as_function_call(
258-
buf: &[u8],
259-
) -> Result<FunctionCall, flatbuffers::InvalidFlatbuffer> {
260-
flatbuffers::size_prefixed_root::<FunctionCall>(buf)
261-
}
262-
#[inline]
263-
/// Verifies, with the given options, that a buffer of bytes
264-
/// contains a `FunctionCall` and returns it.
265-
/// Note that verification is still experimental and may not
266-
/// catch every error, or be maximally performant. For the
267-
/// previous, unchecked, behavior use
268-
/// `root_as_function_call_unchecked`.
269-
pub fn root_as_function_call_with_opts<'b, 'o>(
270-
opts: &'o flatbuffers::VerifierOptions,
271-
buf: &'b [u8],
272-
) -> Result<FunctionCall<'b>, flatbuffers::InvalidFlatbuffer> {
273-
flatbuffers::root_with_opts::<FunctionCall<'b>>(opts, buf)
274-
}
275-
#[inline]
276-
/// Verifies, with the given verifier options, that a buffer of
277-
/// bytes contains a size prefixed `FunctionCall` and returns
278-
/// it. Note that verification is still experimental and may not
279-
/// catch every error, or be maximally performant. For the
280-
/// previous, unchecked, behavior use
281-
/// `root_as_function_call_unchecked`.
282-
pub fn size_prefixed_root_as_function_call_with_opts<'b, 'o>(
283-
opts: &'o flatbuffers::VerifierOptions,
284-
buf: &'b [u8],
285-
) -> Result<FunctionCall<'b>, flatbuffers::InvalidFlatbuffer> {
286-
flatbuffers::size_prefixed_root_with_opts::<FunctionCall<'b>>(opts, buf)
287-
}
288-
#[inline]
289-
/// Assumes, without verification, that a buffer of bytes contains a FunctionCall and returns it.
290-
/// # Safety
291-
/// Callers must trust the given bytes do indeed contain a valid `FunctionCall`.
292-
pub unsafe fn root_as_function_call_unchecked(buf: &[u8]) -> FunctionCall {
293-
flatbuffers::root_unchecked::<FunctionCall>(buf)
294-
}
295-
#[inline]
296-
/// Assumes, without verification, that a buffer of bytes contains a size prefixed FunctionCall and returns it.
297-
/// # Safety
298-
/// Callers must trust the given bytes do indeed contain a valid size prefixed `FunctionCall`.
299-
pub unsafe fn size_prefixed_root_as_function_call_unchecked(buf: &[u8]) -> FunctionCall {
300-
flatbuffers::size_prefixed_root_unchecked::<FunctionCall>(buf)
301-
}
302-
#[inline]
303-
pub fn finish_function_call_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
304-
fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
305-
root: flatbuffers::WIPOffset<FunctionCall<'a>>,
306-
) {
307-
fbb.finish(root, None);
308-
}
309-
310-
#[inline]
311-
pub fn finish_size_prefixed_function_call_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
312-
fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
313-
root: flatbuffers::WIPOffset<FunctionCall<'a>>,
314-
) {
315-
fbb.finish_size_prefixed(root, None);
316-
}

0 commit comments

Comments
 (0)