// @generated by Thrift for thrift/uefisettings_spellings_db.thrift // This file is probably not the place you want to edit! #![recursion_limit = "100000000"] #![allow(non_camel_case_types, non_snake_case, non_upper_case_globals, unused_crate_dependencies)] pub use self::consts::*; pub use self::errors::*; pub use self::types::*; /// Constant definitions for `uefisettings_spellings_db`. pub mod consts { pub const CQ_TPM_STATE: &::std::primitive::str = "TPM State"; pub const CQ_SECURITY_DEVICE_SUPPORT: &::std::primitive::str = "Security Device Support"; pub const CQ_HYPER_THREADING: &::std::primitive::str = "Hyper Threading"; pub const CQ_TXT_SUPPORT: &::std::primitive::str = "TXT Support"; pub const CQ_VT_D: &::std::primitive::str = "VTd"; pub static translation_db: ::once_cell::sync::Lazy<::std::collections::BTreeMap<::std::string::String, crate::types::QuestionMapping>> = ::once_cell::sync::Lazy::new(|| { let mut map = ::std::collections::BTreeMap::new(); map.insert("TPM State".to_owned(), crate::types::QuestionMapping { hii_question: ::std::option::Option::Some(crate::types::HiiQuestion { question_variations: vec![ "TPM State".to_owned(), ], answer_replacements: ::std::option::Option::Some({ let mut map = ::std::collections::BTreeMap::new(); map.insert("Enabled".to_owned(), vec![ "Enabled".to_owned(), "Enable".to_owned(), ]); map.insert("Disabled".to_owned(), vec![ "Disabled".to_owned(), "Disable".to_owned(), ]); map }), ..::std::default::Default::default() }), ilo_question: ::std::option::Option::Some(crate::types::IloQuestion { question: "TpmState".to_owned(), answer_replacements: ::std::option::Option::Some({ let mut map = ::std::collections::BTreeMap::new(); map.insert("Enabled".to_owned(), "PresentEnabled".to_owned()); map }), ..::std::default::Default::default() }), ..::std::default::Default::default() }); map.insert("Security Device Support".to_owned(), crate::types::QuestionMapping { hii_question: ::std::option::Option::Some(crate::types::HiiQuestion { question_variations: vec![ "Security Device Support".to_owned(), ], answer_replacements: ::std::option::Option::Some({ let mut map = ::std::collections::BTreeMap::new(); map.insert("Enabled".to_owned(), vec![ "Enabled".to_owned(), "Enable".to_owned(), ]); map.insert("Disabled".to_owned(), vec![ "Disabled".to_owned(), "Disable".to_owned(), ]); map }), ..::std::default::Default::default() }), ilo_question: ::std::default::Default::default(), ..::std::default::Default::default() }); map.insert("TXT Support".to_owned(), crate::types::QuestionMapping { hii_question: ::std::option::Option::Some(crate::types::HiiQuestion { question_variations: vec![ "TXT Support".to_owned(), "Enable Intel(R) TXT".to_owned(), ], answer_replacements: ::std::option::Option::Some({ let mut map = ::std::collections::BTreeMap::new(); map.insert("Enabled".to_owned(), vec![ "Enabled".to_owned(), "Enable".to_owned(), ]); map.insert("Disabled".to_owned(), vec![ "Disabled".to_owned(), "Disable".to_owned(), ]); map }), ..::std::default::Default::default() }), ilo_question: ::std::option::Option::Some(crate::types::IloQuestion { question: "IntelTxt".to_owned(), answer_replacements: ::std::default::Default::default(), ..::std::default::Default::default() }), ..::std::default::Default::default() }); map.insert("Hyper Threading".to_owned(), crate::types::QuestionMapping { hii_question: ::std::option::Option::Some(crate::types::HiiQuestion { question_variations: vec![ "Hyper-Threading".to_owned(), "Enable LP".to_owned(), "Hyper-Threading [ALL]".to_owned(), ], answer_replacements: ::std::option::Option::Some({ let mut map = ::std::collections::BTreeMap::new(); map.insert("Enabled".to_owned(), vec![ "Enabled".to_owned(), "Enable".to_owned(), ]); map.insert("Disabled".to_owned(), vec![ "Disabled".to_owned(), "Disable".to_owned(), ]); map }), ..::std::default::Default::default() }), ilo_question: ::std::default::Default::default(), ..::std::default::Default::default() }); map.insert("VTd".to_owned(), crate::types::QuestionMapping { hii_question: ::std::option::Option::Some(crate::types::HiiQuestion { question_variations: vec![ "(VT-d)".to_owned(), "VT for Directed I/O".to_owned(), "IntelĀ® VT for Directed I/O (VT-d)".to_owned(), ], answer_replacements: ::std::option::Option::Some({ let mut map = ::std::collections::BTreeMap::new(); map.insert("Enabled".to_owned(), vec![ "Enabled".to_owned(), "Enable".to_owned(), ]); map.insert("Disabled".to_owned(), vec![ "Disabled".to_owned(), "Disable".to_owned(), ]); map }), ..::std::default::Default::default() }), ilo_question: ::std::default::Default::default(), ..::std::default::Default::default() }); map }); } /// Thrift type definitions for `uefisettings_spellings_db`. pub mod types { #![allow(clippy::redundant_closure)] #[derive(Clone, PartialEq)] pub struct QuestionMapping { pub hii_question: ::std::option::Option, pub ilo_question: ::std::option::Option, // This field forces `..Default::default()` when instantiating this // struct, to make code future-proof against new fields added later to // the definition in Thrift. If you don't want this, add the annotation // `(rust.exhaustive)` to the Thrift struct to eliminate this field. #[doc(hidden)] pub _dot_dot_Default_default: self::dot_dot::OtherFields, } #[derive(Clone, PartialEq)] pub struct HiiQuestion { pub question_variations: ::std::vec::Vec<::std::string::String>, pub answer_replacements: ::std::option::Option<::std::collections::BTreeMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>, // This field forces `..Default::default()` when instantiating this // struct, to make code future-proof against new fields added later to // the definition in Thrift. If you don't want this, add the annotation // `(rust.exhaustive)` to the Thrift struct to eliminate this field. #[doc(hidden)] pub _dot_dot_Default_default: self::dot_dot::OtherFields, } #[derive(Clone, PartialEq)] pub struct IloQuestion { pub question: ::std::string::String, pub answer_replacements: ::std::option::Option<::std::collections::BTreeMap<::std::string::String, ::std::string::String>>, // This field forces `..Default::default()` when instantiating this // struct, to make code future-proof against new fields added later to // the definition in Thrift. If you don't want this, add the annotation // `(rust.exhaustive)` to the Thrift struct to eliminate this field. #[doc(hidden)] pub _dot_dot_Default_default: self::dot_dot::OtherFields, } impl ::std::default::Default for self::QuestionMapping { fn default() -> Self { Self { hii_question: ::std::option::Option::None, ilo_question: ::std::option::Option::None, _dot_dot_Default_default: self::dot_dot::OtherFields(()), } } } impl ::std::fmt::Debug for self::QuestionMapping { fn fmt(&self, formatter: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { formatter .debug_struct("QuestionMapping") .field("hii_question", &self.hii_question) .field("ilo_question", &self.ilo_question) .finish() } } unsafe impl ::std::marker::Send for self::QuestionMapping {} unsafe impl ::std::marker::Sync for self::QuestionMapping {} impl ::fbthrift::GetTType for self::QuestionMapping { const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; } impl

::fbthrift::Serialize

for self::QuestionMapping where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { p.write_struct_begin("QuestionMapping"); if let ::std::option::Option::Some(some) = &self.hii_question { p.write_field_begin("hii_question", ::fbthrift::TType::Struct, 1); ::fbthrift::Serialize::write(some, p); p.write_field_end(); } if let ::std::option::Option::Some(some) = &self.ilo_question { p.write_field_begin("ilo_question", ::fbthrift::TType::Struct, 2); ::fbthrift::Serialize::write(some, p); p.write_field_end(); } p.write_field_stop(); p.write_struct_end(); } } impl

::fbthrift::Deserialize

for self::QuestionMapping where P: ::fbthrift::ProtocolReader, { fn read(p: &mut P) -> ::anyhow::Result { static FIELDS: &[::fbthrift::Field] = &[ ::fbthrift::Field::new("hii_question", ::fbthrift::TType::Struct, 1), ::fbthrift::Field::new("ilo_question", ::fbthrift::TType::Struct, 2), ]; let mut field_hii_question = ::std::option::Option::None; let mut field_ilo_question = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; match (fty, fid as ::std::primitive::i32) { (::fbthrift::TType::Stop, _) => break, (::fbthrift::TType::Struct, 1) => field_hii_question = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::Struct, 2) => field_ilo_question = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; } p.read_struct_end()?; ::std::result::Result::Ok(Self { hii_question: field_hii_question, ilo_question: field_ilo_question, _dot_dot_Default_default: self::dot_dot::OtherFields(()), }) } } impl ::std::default::Default for self::HiiQuestion { fn default() -> Self { Self { question_variations: ::std::default::Default::default(), answer_replacements: ::std::option::Option::None, _dot_dot_Default_default: self::dot_dot::OtherFields(()), } } } impl ::std::fmt::Debug for self::HiiQuestion { fn fmt(&self, formatter: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { formatter .debug_struct("HiiQuestion") .field("question_variations", &self.question_variations) .field("answer_replacements", &self.answer_replacements) .finish() } } unsafe impl ::std::marker::Send for self::HiiQuestion {} unsafe impl ::std::marker::Sync for self::HiiQuestion {} impl ::fbthrift::GetTType for self::HiiQuestion { const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; } impl

::fbthrift::Serialize

for self::HiiQuestion where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { p.write_struct_begin("HiiQuestion"); p.write_field_begin("question_variations", ::fbthrift::TType::List, 1); ::fbthrift::Serialize::write(&self.question_variations, p); p.write_field_end(); if let ::std::option::Option::Some(some) = &self.answer_replacements { p.write_field_begin("answer_replacements", ::fbthrift::TType::Map, 2); ::fbthrift::Serialize::write(some, p); p.write_field_end(); } p.write_field_stop(); p.write_struct_end(); } } impl

::fbthrift::Deserialize

for self::HiiQuestion where P: ::fbthrift::ProtocolReader, { fn read(p: &mut P) -> ::anyhow::Result { static FIELDS: &[::fbthrift::Field] = &[ ::fbthrift::Field::new("answer_replacements", ::fbthrift::TType::Map, 2), ::fbthrift::Field::new("question_variations", ::fbthrift::TType::List, 1), ]; let mut field_question_variations = ::std::option::Option::None; let mut field_answer_replacements = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; match (fty, fid as ::std::primitive::i32) { (::fbthrift::TType::Stop, _) => break, (::fbthrift::TType::List, 1) => field_question_variations = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::Map, 2) => field_answer_replacements = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; } p.read_struct_end()?; ::std::result::Result::Ok(Self { question_variations: field_question_variations.unwrap_or_default(), answer_replacements: field_answer_replacements, _dot_dot_Default_default: self::dot_dot::OtherFields(()), }) } } impl ::std::default::Default for self::IloQuestion { fn default() -> Self { Self { question: ::std::default::Default::default(), answer_replacements: ::std::option::Option::None, _dot_dot_Default_default: self::dot_dot::OtherFields(()), } } } impl ::std::fmt::Debug for self::IloQuestion { fn fmt(&self, formatter: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { formatter .debug_struct("IloQuestion") .field("question", &self.question) .field("answer_replacements", &self.answer_replacements) .finish() } } unsafe impl ::std::marker::Send for self::IloQuestion {} unsafe impl ::std::marker::Sync for self::IloQuestion {} impl ::fbthrift::GetTType for self::IloQuestion { const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; } impl

::fbthrift::Serialize

for self::IloQuestion where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { p.write_struct_begin("IloQuestion"); p.write_field_begin("question", ::fbthrift::TType::String, 1); ::fbthrift::Serialize::write(&self.question, p); p.write_field_end(); if let ::std::option::Option::Some(some) = &self.answer_replacements { p.write_field_begin("answer_replacements", ::fbthrift::TType::Map, 2); ::fbthrift::Serialize::write(some, p); p.write_field_end(); } p.write_field_stop(); p.write_struct_end(); } } impl

::fbthrift::Deserialize

for self::IloQuestion where P: ::fbthrift::ProtocolReader, { fn read(p: &mut P) -> ::anyhow::Result { static FIELDS: &[::fbthrift::Field] = &[ ::fbthrift::Field::new("answer_replacements", ::fbthrift::TType::Map, 2), ::fbthrift::Field::new("question", ::fbthrift::TType::String, 1), ]; let mut field_question = ::std::option::Option::None; let mut field_answer_replacements = ::std::option::Option::None; let _ = p.read_struct_begin(|_| ())?; loop { let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; match (fty, fid as ::std::primitive::i32) { (::fbthrift::TType::Stop, _) => break, (::fbthrift::TType::String, 1) => field_question = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (::fbthrift::TType::Map, 2) => field_answer_replacements = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), (fty, _) => p.skip(fty)?, } p.read_field_end()?; } p.read_struct_end()?; ::std::result::Result::Ok(Self { question: field_question.unwrap_or_default(), answer_replacements: field_answer_replacements, _dot_dot_Default_default: self::dot_dot::OtherFields(()), }) } } mod dot_dot { #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct OtherFields(pub(crate) ()); #[allow(dead_code)] // if serde isn't being used pub(super) fn default_for_serde_deserialize() -> OtherFields { OtherFields(()) } } } /// Error return types. pub mod errors { }