pub struct ImportManager;Expand description
Utility struct for managing imports and type classifications
Implementations§
Source§impl ImportManager
impl ImportManager
Sourcepub fn collect_custom_types_from_struct(
rust_struct: &RustStruct,
imports: &mut HashSet<String>,
structs_in_file: &HashSet<String>,
)
pub fn collect_custom_types_from_struct( rust_struct: &RustStruct, imports: &mut HashSet<String>, structs_in_file: &HashSet<String>, )
Collect all custom types referenced by a struct and add them to the imports set
Sourcepub fn collect_custom_types_from_trait(
rust_trait: &RustTrait,
imports: &mut HashSet<String>,
)
pub fn collect_custom_types_from_trait( rust_trait: &RustTrait, imports: &mut HashSet<String>, )
Collect all custom types referenced by a trait and add them to the imports set
Sourcepub fn collect_custom_types_from_type(
rust_type: &RustType,
imports: &mut HashSet<String>,
current_struct_name: &str,
structs_in_file: &HashSet<String>,
)
pub fn collect_custom_types_from_type( rust_type: &RustType, imports: &mut HashSet<String>, current_struct_name: &str, structs_in_file: &HashSet<String>, )
Recursively collect custom types from a RustType
Sourcepub fn get_import_path_for_type(type_name: &str) -> String
pub fn get_import_path_for_type(type_name: &str) -> String
Determine the correct import path for a given type name
Sourcepub fn is_fhir_resource_type(type_name: &str) -> bool
pub fn is_fhir_resource_type(type_name: &str) -> bool
Check if a type is a FHIR resource type
Sourcepub fn is_fhir_trait_type(type_name: &str) -> bool
pub fn is_fhir_trait_type(type_name: &str) -> bool
Check if a type is a FHIR trait type (ends with Accessors, Mutators, or Existence)
Sourcepub fn is_fhir_datatype(type_name: &str) -> bool
pub fn is_fhir_datatype(type_name: &str) -> bool
Check if a type name represents a known FHIR data type
Sourcepub fn is_fhir_primitive_type(type_name: &str) -> bool
pub fn is_fhir_primitive_type(type_name: &str) -> bool
Check if a type is a FHIR primitive type
Sourcepub fn get_fhir_primitive_import_path(type_name: &str) -> String
pub fn get_fhir_primitive_import_path(type_name: &str) -> String
Get the import path for a FHIR primitive type
Sourcepub fn is_generated_trait(type_name: &str) -> bool
pub fn is_generated_trait(type_name: &str) -> bool
Check if a type is a generated trait
Sourcepub fn is_primitive_type(type_name: &str) -> bool
pub fn is_primitive_type(type_name: &str) -> bool
Check if a type name represents a primitive Rust type
Auto Trait Implementations§
impl Freeze for ImportManager
impl RefUnwindSafe for ImportManager
impl Send for ImportManager
impl Sync for ImportManager
impl Unpin for ImportManager
impl UnsafeUnpin for ImportManager
impl UnwindSafe for ImportManager
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