webterm_core/generated/flatbuffers_schema/talk_v1/
f2a_error_type_generated.rs1extern crate alloc;
4extern crate flatbuffers;
5use alloc::boxed::Box;
6use alloc::string::{String, ToString};
7use alloc::vec::Vec;
8use core::mem;
9use core::cmp::Ordering;
10use self::flatbuffers::{EndianScalar, Follow};
11use super::*;
12#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
13pub const ENUM_MIN_F_2A_ERROR_TYPE: u8 = 0;
14#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
15pub const ENUM_MAX_F_2A_ERROR_TYPE: u8 = 0;
16#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
17#[allow(non_camel_case_types)]
18pub const ENUM_VALUES_F_2A_ERROR_TYPE: [F2aErrorType; 1] = [
19 F2aErrorType::ErrorUnspecified,
20];
21
22#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
23#[repr(transparent)]
24pub struct F2aErrorType(pub u8);
25#[allow(non_upper_case_globals)]
26impl F2aErrorType {
27 pub const ErrorUnspecified: Self = Self(0);
28
29 pub const ENUM_MIN: u8 = 0;
30 pub const ENUM_MAX: u8 = 0;
31 pub const ENUM_VALUES: &'static [Self] = &[
32 Self::ErrorUnspecified,
33 ];
34 pub fn variant_name(self) -> Option<&'static str> {
36 match self {
37 Self::ErrorUnspecified => Some("ErrorUnspecified"),
38 _ => None,
39 }
40 }
41}
42impl core::fmt::Debug for F2aErrorType {
43 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
44 if let Some(name) = self.variant_name() {
45 f.write_str(name)
46 } else {
47 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
48 }
49 }
50}
51impl<'a> flatbuffers::Follow<'a> for F2aErrorType {
52 type Inner = Self;
53 #[inline]
54 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
55 let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
56 Self(b)
57 }
58}
59
60impl flatbuffers::Push for F2aErrorType {
61 type Output = F2aErrorType;
62 #[inline]
63 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
64 flatbuffers::emplace_scalar::<u8>(dst, self.0);
65 }
66}
67
68impl flatbuffers::EndianScalar for F2aErrorType {
69 type Scalar = u8;
70 #[inline]
71 fn to_little_endian(self) -> u8 {
72 self.0.to_le()
73 }
74 #[inline]
75 #[allow(clippy::wrong_self_convention)]
76 fn from_little_endian(v: u8) -> Self {
77 let b = u8::from_le(v);
78 Self(b)
79 }
80}
81
82impl<'a> flatbuffers::Verifiable for F2aErrorType {
83 #[inline]
84 fn run_verifier(
85 v: &mut flatbuffers::Verifier, pos: usize
86 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
87 use self::flatbuffers::Verifiable;
88 u8::run_verifier(v, pos)
89 }
90}
91
92impl flatbuffers::SimpleToVerifyInSlice for F2aErrorType {}