pub struct CodegenContext {
pub classes: HashMap<String, ClassInfo>,
pub structs: HashMap<String, StructInfo>,
pub enums: HashMap<String, EnumInfo>,
pub package_to_module: HashMap<String, String>,
pub module_to_feature: HashMap<String, String>,
pub enabled_modules: HashSet<String>,
pub module_classes: BTreeMap<String, Vec<ClassInfo>>,
pub module_structs: BTreeMap<String, Vec<StructInfo>>,
pub module_enums: BTreeMap<String, Vec<EnumInfo>>,
pub func_table: Vec<FuncEntry>,
pub module_deps: BTreeMap<String, BTreeSet<String>>,
pub cpp_prefix: String,
}Fields§
§classes: HashMap<String, ClassInfo>§structs: HashMap<String, StructInfo>§enums: HashMap<String, EnumInfo>§package_to_module: HashMap<String, String>§module_to_feature: HashMap<String, String>§enabled_modules: HashSet<String>§module_classes: BTreeMap<String, Vec<ClassInfo>>§module_structs: BTreeMap<String, Vec<StructInfo>>§module_enums: BTreeMap<String, Vec<EnumInfo>>§func_table: Vec<FuncEntry>§module_deps: BTreeMap<String, BTreeSet<String>>§cpp_prefix: StringImplementations§
Source§impl CodegenContext
impl CodegenContext
pub fn new( classes: Vec<ClassInfo>, structs: Vec<StructInfo>, enums: Vec<EnumInfo>, config: &CodegenConfig, ) -> Self
pub fn is_type_available(&self, type_name: &str) -> bool
pub fn module_for_package(&self, package: &str) -> Option<&str>
pub fn feature_for_module(&self, module: &str) -> Option<&str>
pub fn enum_actual_repr(&self, enum_name: &str) -> Option<&'static str>
Auto Trait Implementations§
impl Freeze for CodegenContext
impl RefUnwindSafe for CodegenContext
impl Send for CodegenContext
impl Sync for CodegenContext
impl Unpin for CodegenContext
impl UnsafeUnpin for CodegenContext
impl UnwindSafe for CodegenContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more